APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.xml.internal.stream

public Class XMLOutputFactoryImpl

extends XMLOutputFactory
Class Inheritance
Imports
java.io.IOException, .OutputStream, .Writer, javax.xml.stream.XMLEventWriter, .XMLOutputFactory, .XMLStreamException, .XMLStreamWriter, javax.xml.transform.Result, javax.xml.transform.dom.DOMResult, javax.xml.transform.stream.StreamResult, javax.xml.transform.stax.StAXResult, com.sun.org.apache.xerces.internal.impl.Constants, .PropertyManager, com.sun.xml.internal.stream.writers.XMLDOMWriterImpl, .XMLEventWriterImpl, .XMLStreamWriterImpl

This class provides the implementation of XMLOutputFactory.
Authors
Neeraj Bajaj,, k venugopal

Field Summary

Modifier and TypeField and Description
private static final boolean
private boolean
fPropertyChanged

This flag indicates the change of property.

private PropertyManager
pack-priv boolean
fReuseInstance

Todo

at the current time, XMLStreamWriters are not Thread safe.

private XMLStreamWriterImpl
Inherited from javax.xml.stream.XMLOutputFactory:
IS_REPAIRING_NAMESPACES

Constructor Summary

AccessConstructor and Description
public
XMLOutputFactoryImpl()

Creates a new instance of XMLOutputFactory

Method Summary

Modifier and TypeMethod and Description
public XMLEventWriter
createXMLEventWriter(OutputStream outputStream)

Implements abstract javax.xml.stream.XMLOutputFactory.createXMLEventWriter.

Create a new XMLEventWriter that writes to a stream

public XMLEventWriter
createXMLEventWriter(OutputStream outputStream, String encoding)

Implements abstract javax.xml.stream.XMLOutputFactory.createXMLEventWriter.

Create a new XMLEventWriter that writes to a stream

public XMLEventWriter
createXMLEventWriter(Result result)

Implements abstract javax.xml.stream.XMLOutputFactory.createXMLEventWriter.

Create a new XMLEventWriter that writes to a JAXP result.

public XMLEventWriter
createXMLEventWriter(Writer writer)

Implements abstract javax.xml.stream.XMLOutputFactory.createXMLEventWriter.

Create a new XMLEventWriter that writes to a writer

public XMLStreamWriter
createXMLStreamWriter(Result result)

Implements abstract javax.xml.stream.XMLOutputFactory.createXMLStreamWriter.

Create a new XMLStreamWriter that writes to a JAXP result.

public XMLStreamWriter
createXMLStreamWriter(Writer writer)

Implements abstract javax.xml.stream.XMLOutputFactory.createXMLStreamWriter.

Create a new XMLStreamWriter that writes to a writer

public XMLStreamWriter
createXMLStreamWriter(OutputStream outputStream)

Implements abstract javax.xml.stream.XMLOutputFactory.createXMLStreamWriter.

Create a new XMLStreamWriter that writes to a stream

public XMLStreamWriter
createXMLStreamWriter(OutputStream outputStream, String encoding)

Implements abstract javax.xml.stream.XMLOutputFactory.createXMLStreamWriter.

Create a new XMLStreamWriter that writes to a stream

pack-priv XMLStreamWriter
public Object
getProperty(String name)

Implements abstract javax.xml.stream.XMLOutputFactory.getProperty.

Get a feature/property on the underlying implementation

public boolean
isPropertySupported(String name)

Implements abstract javax.xml.stream.XMLOutputFactory.isPropertySupported.

Query the set of properties that this factory supports.

public void
setProperty(String name, Object value)

Implements abstract javax.xml.stream.XMLOutputFactory.setProperty.

Allows the user to set specific features/properties on the underlying implementation.

pack-priv StreamResult
toStreamResult(OutputStream os, Writer writer, String systemId)

StreamResult object is re-used and the values are set appropriately.

Inherited from javax.xml.stream.XMLOutputFactory:
newDefaultFactorynewFactorynewFactorynewInstancenewInstance

Field Detail

DEBUGback to summary
private static final boolean DEBUG
fPropertyChangedback to summary
private boolean fPropertyChanged

This flag indicates the change of property. If true, PropertyManager should be passed when creating XMLStreamWriterImpl

fPropertyManagerback to summary
private PropertyManager fPropertyManager
fReuseInstanceback to summary
pack-priv boolean fReuseInstance

Todo

at the current time, XMLStreamWriters are not Thread safe.

fStreamWriterback to summary
private XMLStreamWriterImpl fStreamWriter

Constructor Detail

XMLOutputFactoryImplback to summary
public XMLOutputFactoryImpl()

Creates a new instance of XMLOutputFactory

Method Detail

createXMLEventWriterback to summary
public XMLEventWriter createXMLEventWriter(OutputStream outputStream) throws XMLStreamException

Implements abstract javax.xml.stream.XMLOutputFactory.createXMLEventWriter.

Doc from javax.xml.stream.XMLOutputFactory.createXMLEventWriter.

Create a new XMLEventWriter that writes to a stream

Exceptions
XMLStreamException:
if an error occurs
createXMLEventWriterback to summary
public XMLEventWriter createXMLEventWriter(OutputStream outputStream, String encoding) throws XMLStreamException

Implements abstract javax.xml.stream.XMLOutputFactory.createXMLEventWriter.

Doc from javax.xml.stream.XMLOutputFactory.createXMLEventWriter.

Create a new XMLEventWriter that writes to a stream

Exceptions
XMLStreamException:
if an error occurs
createXMLEventWriterback to summary
public XMLEventWriter createXMLEventWriter(Result result) throws XMLStreamException

Implements abstract javax.xml.stream.XMLOutputFactory.createXMLEventWriter.

Doc from javax.xml.stream.XMLOutputFactory.createXMLEventWriter.

Create a new XMLEventWriter that writes to a JAXP result. This method is optional.

Exceptions
XMLStreamException:
if an error occurs
createXMLEventWriterback to summary
public XMLEventWriter createXMLEventWriter(Writer writer) throws XMLStreamException

Implements abstract javax.xml.stream.XMLOutputFactory.createXMLEventWriter.

Doc from javax.xml.stream.XMLOutputFactory.createXMLEventWriter.

Create a new XMLEventWriter that writes to a writer

Exceptions
XMLStreamException:
if an error occurs
createXMLStreamWriterback to summary
public XMLStreamWriter createXMLStreamWriter(Result result) throws XMLStreamException

Implements abstract javax.xml.stream.XMLOutputFactory.createXMLStreamWriter.

Doc from javax.xml.stream.XMLOutputFactory.createXMLStreamWriter.

Create a new XMLStreamWriter that writes to a JAXP result. This method is optional.

Exceptions
XMLStreamException:
if an error occurs
createXMLStreamWriterback to summary
public XMLStreamWriter createXMLStreamWriter(Writer writer) throws XMLStreamException

Implements abstract javax.xml.stream.XMLOutputFactory.createXMLStreamWriter.

Doc from javax.xml.stream.XMLOutputFactory.createXMLStreamWriter.

Create a new XMLStreamWriter that writes to a writer

Exceptions
XMLStreamException:
if an error occurs
createXMLStreamWriterback to summary
public XMLStreamWriter createXMLStreamWriter(OutputStream outputStream) throws XMLStreamException

Implements abstract javax.xml.stream.XMLOutputFactory.createXMLStreamWriter.

Doc from javax.xml.stream.XMLOutputFactory.createXMLStreamWriter.

Create a new XMLStreamWriter that writes to a stream

Exceptions
XMLStreamException:
if an error occurs
createXMLStreamWriterback to summary
public XMLStreamWriter createXMLStreamWriter(OutputStream outputStream, String encoding) throws XMLStreamException

Implements abstract javax.xml.stream.XMLOutputFactory.createXMLStreamWriter.

Doc from javax.xml.stream.XMLOutputFactory.createXMLStreamWriter.

Create a new XMLStreamWriter that writes to a stream

Exceptions
XMLStreamException:
if an error occurs
createXMLStreamWriterback to summary
pack-priv XMLStreamWriter createXMLStreamWriter(StreamResult sr, String encoding) throws XMLStreamException
getPropertyback to summary
public Object getProperty(String name) throws IllegalArgumentException

Implements abstract javax.xml.stream.XMLOutputFactory.getProperty.

Doc from javax.xml.stream.XMLOutputFactory.getProperty.

Get a feature/property on the underlying implementation

Exceptions
IllegalArgumentException:
if the property is not supported
isPropertySupportedback to summary
public boolean isPropertySupported(String name)

Implements abstract javax.xml.stream.XMLOutputFactory.isPropertySupported.

Doc from javax.xml.stream.XMLOutputFactory.isPropertySupported.

Query the set of properties that this factory supports.

setPropertyback to summary
public void setProperty(String name, Object value) throws IllegalArgumentException

Implements abstract javax.xml.stream.XMLOutputFactory.setProperty.

Doc from javax.xml.stream.XMLOutputFactory.setProperty.

Allows the user to set specific features/properties on the underlying implementation.

Exceptions
IllegalArgumentException:
if the property is not supported
toStreamResultback to summary
pack-priv StreamResult toStreamResult(OutputStream os, Writer writer, String systemId)

StreamResult object is re-used and the values are set appropriately.