Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.dom

public Class DOMOutputImpl

extends Object
implements LSOutput
Class Inheritance
All Implemented Interfaces
org.w3c.dom.ls.LSOutput
Imports
org.w3c.dom.ls.LSOutput, java.io.Writer, .OutputStream

This class represents an output destination for data. This interface allows an application to encapsulate information about an output destination in a single object, which may include a URI, a byte stream (possibly with a specifiedencoding), a base URI, and/or a character stream. The exact definitions of a byte stream and a character stream are binding dependent. The application is expected to provide objects that implement this interface whenever such objects are needed. The application can either provide its own objects that implement this interface, or it can use the generic factory method DOMImplementationLS.createLSOutput() to create objects that implement this interface. The DOMSerializer will use the LSOutput object to determine where to serialize the output to. The DOMSerializer will look at the different outputs specified in the LSOutput in the following order to know which one to output to, the first one that data can be output to will be used: 1.LSOutput.characterStream 2.LSOutput.byteStream 3.LSOutput.systemId LSOutput objects belong to the application. The DOM implementation will never modify them (though it may make copies and modify the copies, if necessary).
Authors
Arun Yadav, Sun Microsytems, Gopal Sharma, Sun Microsystems

Field Summary

Modifier and TypeField and Description
protected OutputStream
protected Writer
protected String
protected String

Constructor Summary

AccessConstructor and Description
public
DOMOutputImpl()

Default Constructor

Method Summary

Modifier and TypeMethod and Description
public OutputStream
getByteStream()

Implements org.w3c.dom.ls.LSOutput.getByteStream.

Depending on the language binding in use, this attribute may not be available.

public Writer
getCharacterStream()

Implements org.w3c.dom.ls.LSOutput.getCharacterStream.

An attribute of a language and binding dependent type that represents a writable stream of bytes.

public String
getEncoding()

Implements org.w3c.dom.ls.LSOutput.getEncoding.

The character encoding, if known.

public String
getSystemId()

Implements org.w3c.dom.ls.LSOutput.getSystemId.

The system identifier, a URI reference [IETF RFC 2396], for this output destination.

public void
setByteStream(OutputStream byteStream)

Implements org.w3c.dom.ls.LSOutput.setByteStream.

Depending on the language binding in use, this attribute may not be available.

public void
setCharacterStream(Writer characterStream)

Implements org.w3c.dom.ls.LSOutput.setCharacterStream.

An attribute of a language and binding dependent type that represents a writable stream of bytes.

public void
setEncoding(String encoding)

Implements org.w3c.dom.ls.LSOutput.setEncoding.

The character encoding, if known.

public void
setSystemId(String systemId)

Implements org.w3c.dom.ls.LSOutput.setSystemId.

The system identifier, a URI reference [IETF RFC 2396], for this output destination.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fByteStreamback to summary
protected OutputStream fByteStream
fCharStreamback to summary
protected Writer fCharStream
fEncodingback to summary
protected String fEncoding
fSystemIdback to summary
protected String fSystemId

Constructor Detail

DOMOutputImplback to summary
public DOMOutputImpl()

Default Constructor

Method Detail

getByteStreamback to summary
public OutputStream getByteStream()

Implements org.w3c.dom.ls.LSOutput.getByteStream.

Depending on the language binding in use, this attribute may not be available. An attribute of a language and binding dependent type that represents a writable stream to which 16-bit units can be output. The application must encode the stream using UTF-16 (defined in [Unicode] and Amendment 1 of [ISO/IEC 10646]).

getCharacterStreamback to summary
public Writer getCharacterStream()

Implements org.w3c.dom.ls.LSOutput.getCharacterStream.

An attribute of a language and binding dependent type that represents a writable stream of bytes. If the application knows the character encoding of the byte stream, it should set the encoding attribute. Setting the encoding in this way will override any encoding specified in an XML declaration in the data.

getEncodingback to summary
public String getEncoding()

Implements org.w3c.dom.ls.LSOutput.getEncoding.

The character encoding, if known. The encoding must be a string acceptable for an XML encoding declaration ([XML 1.0] section 4.3.3 "Character Encoding in Entities"). This attribute has no effect when the application provides a character stream or string data. For other sources of input, an encoding specified by means of this attribute will override any encoding specified in the XML declaration or the Text declaration, or an encoding obtained from a higher level protocol, such as HTTP [IETF RFC 2616].

getSystemIdback to summary
public String getSystemId()

Implements org.w3c.dom.ls.LSOutput.getSystemId.

The system identifier, a URI reference [IETF RFC 2396], for this output destination. If the application knows the character encoding of the object pointed to by the system identifier, it can set the encoding using the encoding attribute. If the system ID is a relative URI reference (see section 5 in [IETF RFC 2396]), the behavior is implementation dependent.

setByteStreamback to summary
public void setByteStream(OutputStream byteStream)

Implements org.w3c.dom.ls.LSOutput.setByteStream.

Depending on the language binding in use, this attribute may not be available. An attribute of a language and binding dependent type that represents a writable stream to which 16-bit units can be output. The application must encode the stream using UTF-16 (defined in [Unicode] and Amendment 1 of [ISO/IEC 10646]).

setCharacterStreamback to summary
public void setCharacterStream(Writer characterStream)

Implements org.w3c.dom.ls.LSOutput.setCharacterStream.

An attribute of a language and binding dependent type that represents a writable stream of bytes. If the application knows the character encoding of the byte stream, it should set the encoding attribute. Setting the encoding in this way will override any encoding specified in an XML declaration in the data.

setEncodingback to summary
public void setEncoding(String encoding)

Implements org.w3c.dom.ls.LSOutput.setEncoding.

The character encoding, if known. The encoding must be a string acceptable for an XML encoding declaration ([XML 1.0] section 4.3.3 "Character Encoding in Entities"). This attribute has no effect when the application provides a character stream or string data. For other sources of input, an encoding specified by means of this attribute will override any encoding specified in the XML declaration or the Text declaration, or an encoding obtained from a higher level protocol, such as HTTP [IETF RFC 2616].

setSystemIdback to summary
public void setSystemId(String systemId)

Implements org.w3c.dom.ls.LSOutput.setSystemId.

The system identifier, a URI reference [IETF RFC 2396], for this output destination. If the application knows the character encoding of the object pointed to by the system identifier, it can set the encoding using the encoding attribute. If the system ID is a relative URI reference (see section 5 in [IETF RFC 2396]), the behavior is implementation dependent.