Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xerces.dom
Class DOMOutputImpl

    java.lang.Object
      |
      +--org.apache.xerces.dom.DOMOutputImpl

All Implemented Interfaces:
  org.w3c.dom.ls.LSOutput

public class DOMOutputImpl
extends java.lang.Object
implements org.w3c.dom.ls.LSOutput

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).

# INTERNAL:

  Usage of this class is not supported. It may be altered or removed at any time.

Author:
  Arun Yadav, Sun Microsytems, Gopal Sharma, Sun Microsystems

Field Summary
`protected java.io.OutputStream` | `fByteStream`
`protected java.io.Writer` | `fCharStream`
`protected java.lang.String` | `fEncoding`
`protected java.lang.String` | `fSystemId`

Constructor Summary
`DOMOutputImpl()` Default Constructor

Method Summary
`java.io.OutputStream` | `getByteStream()` Depending on the language binding in use, this attribute may not be available.
`java.io.Writer` | `getCharacterStream()` An attribute of a language and binding dependent type that represents a writable stream of bytes.
`java.lang.String` | `getEncoding()` The character encoding, if known.
`java.lang.String` | `getSystemId()` The system identifier, a URI reference [IETF RFC 2396], for this output destination.
`void` | `setByteStream(java.io.OutputStream byteStream)` Depending on the language binding in use, this attribute may not be available.
`void` | `setCharacterStream(java.io.Writer characterStream)` An attribute of a language and binding dependent type that represents a writable stream of bytes.
`void` | `setEncoding(java.lang.String encoding)` The character encoding, if known.
`void` | `setSystemId(java.lang.String systemId)` The system identifier, a URI reference [IETF RFC 2396], for this output destination.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### fCharStream

    protected java.io.Writer fCharStream

### fByteStream

    protected java.io.OutputStream fByteStream

### fSystemId

    protected java.lang.String fSystemId

### fEncoding

    protected java.lang.String fEncoding

Constructor Detail

### DOMOutputImpl

    public DOMOutputImpl()

  Default Constructor

Method Detail

### getCharacterStream

    public java.io.Writer 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.
  Specified by:
    `getCharacterStream` in interface `org.w3c.dom.ls.LSOutput`

### setCharacterStream

    public void setCharacterStream(java.io.Writer characterStream)

  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.
  Specified by:
    `setCharacterStream` in interface `org.w3c.dom.ls.LSOutput`

### getByteStream

    public java.io.OutputStream 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]).
  Specified by:
    `getByteStream` in interface `org.w3c.dom.ls.LSOutput`

### setByteStream

    public void setByteStream(java.io.OutputStream byteStream)

  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]).
  Specified by:
    `setByteStream` in interface `org.w3c.dom.ls.LSOutput`

### getSystemId

    public java.lang.String 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.
  Specified by:
    `getSystemId` in interface `org.w3c.dom.ls.LSOutput`

### setSystemId

    public void setSystemId(java.lang.String systemId)

  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.
  Specified by:
    `setSystemId` in interface `org.w3c.dom.ls.LSOutput`

### getEncoding

    public java.lang.String 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].
  Specified by:
    `getEncoding` in interface `org.w3c.dom.ls.LSOutput`

### setEncoding

    public void setEncoding(java.lang.String encoding)

  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].
  Specified by:
    `setEncoding` in interface `org.w3c.dom.ls.LSOutput`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2007 The Apache Software Foundation. All Rights Reserved.