001 /* 002 ** 003 ** Licensed to the Apache Software Foundation (ASF) under one 004 ** or more contributor license agreements. See the NOTICE file 005 ** distributed with this work for additional information 006 ** regarding copyright ownership. The ASF licenses this file 007 ** to you under the Apache License, Version 2.0 (the 008 ** "License"); you may not use this file except in compliance 009 ** with the License. You may obtain a copy of the License at 010 ** 011 ** http://www.apache.org/licenses/LICENSE-2.0 012 ** 013 ** Unless required by applicable law or agreed to in writing, 014 ** software distributed under the License is distributed on an 015 ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 016 ** KIND, either express or implied. See the License for the 017 ** specific language governing permissions and limitations 018 ** under the License. 019 */ 020 package javax.xml.stream; 021 022 public abstract class XMLOutputFactory { 023 public static final String IS_REPAIRING_NAMESPACES = "javax.xml.stream.isRepairingNamespaces"; 024 025 protected XMLOutputFactory() { } 026 027 public static XMLOutputFactory newInstance() 028 throws FactoryConfigurationError { 029 return (XMLOutputFactory) FactoryLocator.locate("javax.xml.stream.XMLOutputFactory", "com.ctc.wstx.stax.WstxOutputFactory"); 030 } 031 032 public static XMLInputFactory newInstance(String factoryId, 033 java.lang.ClassLoader classLoader) throws FactoryConfigurationError { 034 return (XMLInputFactory) FactoryLocator.locate(factoryId, "com.ctc.wstx.stax.WstxOutputFactory", classLoader); 035 } 036 037 public abstract XMLStreamWriter createXMLStreamWriter(java.io.Writer stream) 038 throws XMLStreamException; 039 040 public abstract XMLStreamWriter createXMLStreamWriter( 041 java.io.OutputStream stream) throws XMLStreamException; 042 043 public abstract XMLStreamWriter createXMLStreamWriter( 044 java.io.OutputStream stream, String encoding) 045 throws XMLStreamException; 046 047 public abstract XMLStreamWriter createXMLStreamWriter( 048 javax.xml.transform.Result result) throws XMLStreamException; 049 050 public abstract XMLEventWriter createXMLEventWriter( 051 javax.xml.transform.Result result) throws XMLStreamException; 052 053 public abstract XMLEventWriter createXMLEventWriter( 054 java.io.OutputStream stream) throws XMLStreamException; 055 056 public abstract XMLEventWriter createXMLEventWriter( 057 java.io.OutputStream stream, String encoding) 058 throws XMLStreamException; 059 060 public abstract XMLEventWriter createXMLEventWriter(java.io.Writer stream) 061 throws XMLStreamException; 062 063 public abstract void setProperty(String name, Object value) 064 throws IllegalArgumentException; 065 066 public abstract Object getProperty(String name) 067 throws IllegalArgumentException; 068 069 public abstract boolean isPropertySupported(String name); 070 }