Top Fields Constructors Methods
org.apache.xerces.stax.events

public final Class StartDocumentImpl

extends XMLEventImpl
implements StartDocument
Class Inheritance
All Implemented Interfaces
javax.xml.stream.events.StartDocument, javax.xml.stream.events.XMLEvent, javax.xml.stream.XMLStreamConstants
Imports
java.io.IOException, .Writer, javax.xml.stream.Location, .XMLStreamException, javax.xml.stream.events.StartDocument

Author
Lucian Holland
Version
$Id: StartDocumentImpl.java 730471 2008-12-31 20:45:32Z mrglavas $

Field Summary

Modifier and TypeField and Description
private final String
private final boolean
private final boolean
private final boolean
private final String

Constructor Summary

AccessConstructor and Description
public
StartDocumentImpl(final String charEncoding, final boolean encodingSet, final boolean isStandalone, final boolean standaloneSet, final String version, final Location location)

Method Summary

Modifier and TypeMethod and Description
public boolean
encodingSet()

Implements javax.xml.stream.events.StartDocument.encodingSet.

Returns true if CharacterEncodingScheme is set in the encoding declaration of the document
public String
public String
getSystemId()

Implements javax.xml.stream.events.StartDocument.getSystemId.

Returns the system ID of the XML data
public String
getVersion()

Implements javax.xml.stream.events.StartDocument.getVersion.

Returns the version of XML of this XML stream
public boolean
isStandalone()

Implements javax.xml.stream.events.StartDocument.isStandalone.

Returns if this XML is standalone
public boolean
standaloneSet()

Implements javax.xml.stream.events.StartDocument.standaloneSet.

Returns true if the standalone attribute is set in the encoding declaration of the document.
public void
writeAsEncodedUnicode(Writer
The writer that will output the data
writer
)

Implements javax.xml.stream.events.XMLEvent.writeAsEncodedUnicode.

This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.
Inherited from org.apache.xerces.stax.events.XMLEventImpl:
asCharactersasEndElementasStartElementgetEventTypegetLocationgetSchemaTypeisAttributeisCharactersisEndDocumentisEndElementisEntityReferenceisNamespaceisProcessingInstructionisStartDocumentisStartElementtoString

Field Detail

fCharEncodingback to summary
private final String fCharEncoding
fEncodingSetback to summary
private final boolean fEncodingSet
fIsStandaloneback to summary
private final boolean fIsStandalone
fStandaloneSetback to summary
private final boolean fStandaloneSet
fVersionback to summary
private final String fVersion

Constructor Detail

StartDocumentImplback to summary
public StartDocumentImpl(final String charEncoding, final boolean encodingSet, final boolean isStandalone, final boolean standaloneSet, final String version, final Location location)

Method Detail

encodingSetback to summary
public boolean encodingSet()

Implements javax.xml.stream.events.StartDocument.encodingSet.

Doc from javax.xml.stream.events.StartDocument.encodingSet.

Returns true if CharacterEncodingScheme is set in the encoding declaration of the document

Returns:boolean

true if CharacterEncodingScheme is set, false otherwise

See Also
javax.xml.stream.events.StartDocument#encodingSet()
getCharacterEncodingSchemeback to summary
public String getCharacterEncodingScheme()

Implements javax.xml.stream.events.StartDocument.getCharacterEncodingScheme.

Doc from javax.xml.stream.events.StartDocument.getCharacterEncodingScheme.

Returns the encoding style of the XML data

Returns:String

the character encoding, defaults to "UTF-8"

See Also
javax.xml.stream.events.StartDocument#getCharacterEncodingScheme()
getSystemIdback to summary
public String getSystemId()

Implements javax.xml.stream.events.StartDocument.getSystemId.

Doc from javax.xml.stream.events.StartDocument.getSystemId.

Returns the system ID of the XML data

Returns:String

the system ID, defaults to ""

See Also
javax.xml.stream.events.StartDocument#getSystemId()
getVersionback to summary
public String getVersion()

Implements javax.xml.stream.events.StartDocument.getVersion.

Doc from javax.xml.stream.events.StartDocument.getVersion.

Returns the version of XML of this XML stream

Returns:String

the version of XML, defaults to "1.0"

See Also
javax.xml.stream.events.StartDocument#getVersion()
isStandaloneback to summary
public boolean isStandalone()

Implements javax.xml.stream.events.StartDocument.isStandalone.

Doc from javax.xml.stream.events.StartDocument.isStandalone.

Returns if this XML is standalone

Returns:boolean

the standalone state of XML, defaults to "no"

See Also
javax.xml.stream.events.StartDocument#isStandalone()
standaloneSetback to summary
public boolean standaloneSet()

Implements javax.xml.stream.events.StartDocument.standaloneSet.

Doc from javax.xml.stream.events.StartDocument.standaloneSet.

Returns true if the standalone attribute is set in the encoding declaration of the document.

Returns:boolean

true if the standalone attribute is set, false otherwise

See Also
javax.xml.stream.events.StartDocument#standaloneSet()
writeAsEncodedUnicodeback to summary
public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException

Implements javax.xml.stream.events.XMLEvent.writeAsEncodedUnicode.

Doc from javax.xml.stream.events.XMLEvent.writeAsEncodedUnicode.

This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters. No indentation or whitespace should be outputted. Any user defined event type SHALL have this method called when being written to on an output stream. Built in Event types MUST implement this method, but implementations MAY choose not call these methods for optimizations reasons when writing out built in Events to an output stream. The output generated MUST be equivalent in terms of the infoset expressed.

Parameters
writer:Writer

The writer that will output the data

Exceptions
XMLStreamException:
if there is a fatal error writing the event