Package com.bea.xml.stream.events
Class StartDocumentEvent
- java.lang.Object
-
- com.bea.xml.stream.events.BaseEvent
-
- com.bea.xml.stream.events.StartDocumentEvent
-
- All Implemented Interfaces:
javax.xml.stream.events.StartDocument
,javax.xml.stream.events.XMLEvent
,javax.xml.stream.Location
,javax.xml.stream.XMLStreamConstants
public class StartDocumentEvent extends BaseEvent implements javax.xml.stream.events.StartDocument
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
encodingScheme
protected java.lang.String
publicId
protected boolean
standalone
protected java.lang.String
systemId
protected java.lang.String
version
-
Constructor Summary
Constructors Constructor Description StartDocumentEvent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
protected void
doWriteAsEncodedUnicode(java.io.Writer writer)
Template method to be implemented by sub-classes.boolean
encodingSet()
Returns true if CharacterEncodingScheme was set in the encoding declaration of the documentjava.lang.String
getCharacterEncodingScheme()
Returns the encoding style of the XML datajava.lang.String
getSystemId()
Returns the system ID of the XMLjava.lang.String
getVersion()
Returns the version of XML of this XML streamprotected void
init()
boolean
isStandalone()
Returns if this XML is standalonevoid
setEncoding(java.lang.String encoding)
void
setStandalone(boolean standalone)
void
setStandalone(java.lang.String standalone)
void
setVersion(java.lang.String version)
boolean
standaloneSet()
Returns true if the standalone attribute was set in the encoding declaration of the document.-
Methods inherited from class com.bea.xml.stream.events.BaseEvent
asCharacters, asEndElement, asStartElement, getCharacterOffset, getColumnNumber, getEventType, getLineNumber, getLocation, getLocationURI, getPublicId, getSchemaType, getSourceName, getTypeAsString, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, recycle, setCharacterOffset, setColumnNumber, setEventType, setLineNumber, setLocationURI, toString, writeAsEncodedUnicode
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.xml.stream.events.XMLEvent
asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode
-
-
-
-
Method Detail
-
init
protected void init()
-
getSystemId
public java.lang.String getSystemId()
Description copied from interface:javax.xml.stream.Location
Returns the system ID of the XML- Specified by:
getSystemId
in interfacejavax.xml.stream.Location
- Specified by:
getSystemId
in interfacejavax.xml.stream.events.StartDocument
- Overrides:
getSystemId
in classBaseEvent
- Returns:
- the system ID, or null if not available
-
getCharacterEncodingScheme
public java.lang.String getCharacterEncodingScheme()
Description copied from interface:javax.xml.stream.events.StartDocument
Returns the encoding style of the XML data- Specified by:
getCharacterEncodingScheme
in interfacejavax.xml.stream.events.StartDocument
- Returns:
- the character encoding, defaults to "UTF-8"
-
isStandalone
public boolean isStandalone()
Description copied from interface:javax.xml.stream.events.StartDocument
Returns if this XML is standalone- Specified by:
isStandalone
in interfacejavax.xml.stream.events.StartDocument
- Returns:
- the standalone state of XML, defaults to "no"
-
getVersion
public java.lang.String getVersion()
Description copied from interface:javax.xml.stream.events.StartDocument
Returns the version of XML of this XML stream- Specified by:
getVersion
in interfacejavax.xml.stream.events.StartDocument
- Returns:
- the version of XML, defaults to "1.0"
-
setStandalone
public void setStandalone(boolean standalone)
-
setStandalone
public void setStandalone(java.lang.String standalone)
-
encodingSet
public boolean encodingSet()
Description copied from interface:javax.xml.stream.events.StartDocument
Returns true if CharacterEncodingScheme was set in the encoding declaration of the document- Specified by:
encodingSet
in interfacejavax.xml.stream.events.StartDocument
-
standaloneSet
public boolean standaloneSet()
Description copied from interface:javax.xml.stream.events.StartDocument
Returns true if the standalone attribute was set in the encoding declaration of the document.- Specified by:
standaloneSet
in interfacejavax.xml.stream.events.StartDocument
-
setEncoding
public void setEncoding(java.lang.String encoding)
-
setVersion
public void setVersion(java.lang.String version)
-
clear
public void clear()
-
doWriteAsEncodedUnicode
protected void doWriteAsEncodedUnicode(java.io.Writer writer) throws java.io.IOException
Description copied from class:BaseEvent
Template method to be implemented by sub-classes.- Specified by:
doWriteAsEncodedUnicode
in classBaseEvent
- Throws:
java.io.IOException
-
-