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

public Class StartDocumentEvent

extends DummyEvent
implements StartDocument
Class Inheritance
All Implemented Interfaces
javax.xml.stream.events.StartDocument, javax.xml.stream.events.XMLEvent, javax.xml.stream.XMLStreamConstants
Imports
javax.xml.stream.events.StartDocument, javax.xml.stream.Location, .XMLStreamConstants

Implementation of StartDocumentEvent.
Authors
Neeraj Bajaj Sun Microsystems,Inc., K.Venugopal Sun Microsystems,Inc.

Field Summary

Modifier and TypeField and Description
protected String
private boolean
protected boolean
private boolean
protected String
protected String
private boolean
Inherited from com.sun.xml.internal.stream.events.DummyEvent:
fLocation

Constructor Summary

AccessConstructor and Description
public
public
public
StartDocumentEvent(String encoding, String version)

public
StartDocumentEvent(String encoding, String version, boolean standalone)

public
StartDocumentEvent(String encoding, String version, boolean standalone, Location loc)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
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

protected void
init(String encoding, String version, boolean standalone, Location loc)

public boolean
isStandalone()

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

Returns if this XML is standalone

public boolean
isStartDocument()

Overrides com.sun.xml.internal.stream.events.DummyEvent.isStartDocument.

Implements javax.xml.stream.events.XMLEvent.isStartDocument.

A utility function to check if this event is a StartDocument.

pack-priv void
setDeclaredEncoding(boolean value)

public void
setEncoding(String encoding)

public void
setStandalone(boolean isStandalone, boolean standaloneSet)

public void
public void
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 String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

protected void
writeAsEncodedUnicodeEx(Writer writer)

Implements abstract com.sun.xml.internal.stream.events.DummyEvent.writeAsEncodedUnicodeEx.

Helper method in order to expose IOException.

Inherited from com.sun.xml.internal.stream.events.DummyEvent:
asCharactersasEndElementasStartElementcharEncodegetEventTypegetLocationgetSchemaTypeisAttributeisCharacterDataisCharactersisEndDocumentisEndElementisEntityReferenceisNamespaceisProcessingInstructionisStartElementsetEventTypesetLocationwriteAsEncodedUnicode

Field Detail

fEncodingScheamback to summary
protected String fEncodingScheam
fEncodingSchemeSetback to summary
private boolean fEncodingSchemeSet
fStandaloneback to summary
protected boolean fStandalone
fStandaloneSetback to summary
private boolean fStandaloneSet
fSystemIdback to summary
protected String fSystemId
fVersionback to summary
protected String fVersion
nestedCallback to summary
private boolean nestedCall

Constructor Detail

StartDocumentEventback to summary
public StartDocumentEvent()
StartDocumentEventback to summary
public StartDocumentEvent(String encoding)
StartDocumentEventback to summary
public StartDocumentEvent(String encoding, String version)
StartDocumentEventback to summary
public StartDocumentEvent(String encoding, String version, boolean standalone)
StartDocumentEventback to summary
public StartDocumentEvent(String encoding, String version, boolean standalone, Location loc)

Method Detail

clearback to summary
pack-priv void clear()
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

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

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

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

initback to summary
protected void init(String encoding, String version, boolean standalone, Location loc)
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

isStartDocumentback to summary
public boolean isStartDocument()

Overrides com.sun.xml.internal.stream.events.DummyEvent.isStartDocument.

Implements javax.xml.stream.events.XMLEvent.isStartDocument.

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

A utility function to check if this event is a StartDocument.

setDeclaredEncodingback to summary
pack-priv void setDeclaredEncoding(boolean value)
setEncodingback to summary
public void setEncoding(String encoding)
setStandaloneback to summary
public void setStandalone(boolean isStandalone, boolean standaloneSet)
setStandaloneback to summary
public void setStandalone(String s)
setVersionback to summary
public void setVersion(String s)
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.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

writeAsEncodedUnicodeExback to summary
protected void writeAsEncodedUnicodeEx(Writer writer) throws IOException

Implements abstract com.sun.xml.internal.stream.events.DummyEvent.writeAsEncodedUnicodeEx.

Doc from com.sun.xml.internal.stream.events.DummyEvent.writeAsEncodedUnicodeEx.

Helper method in order to expose IOException.

Exceptions
IOException:
if there is an IO error