Class StartDocumentEvent

java.lang.Object
com.sun.xml.fastinfoset.stax.events.EventBase
com.sun.xml.fastinfoset.stax.events.StartDocumentEvent
All Implemented Interfaces:
StartDocument, XMLEvent, XMLStreamConstants

public class StartDocumentEvent extends EventBase implements StartDocument
  • Field Details

    • _systemId

      protected String _systemId
    • _encoding

      protected String _encoding
    • _standalone

      protected boolean _standalone
    • _version

      protected String _version
    • _encodingSet

      private boolean _encodingSet
    • _standaloneSet

      private boolean _standaloneSet
  • Constructor Details

    • StartDocumentEvent

      public StartDocumentEvent()
    • StartDocumentEvent

      public StartDocumentEvent(String encoding)
    • StartDocumentEvent

      public StartDocumentEvent(String encoding, String version)
  • Method Details

    • reset

      public void reset()
    • getSystemId

      public String getSystemId()
      Returns the system ID of the XML data
      Specified by:
      getSystemId in interface StartDocument
      Overrides:
      getSystemId in class EventBase
      Returns:
      the system ID, defaults to ""
    • getCharacterEncodingScheme

      public String getCharacterEncodingScheme()
      Returns the encoding style of the XML data
      Specified by:
      getCharacterEncodingScheme in interface StartDocument
      Returns:
      the character encoding, defaults to "UTF-8"
    • encodingSet

      public boolean encodingSet()
      Returns true if CharacterEncodingScheme was set in the encoding declaration of the document
      Specified by:
      encodingSet in interface StartDocument
    • isStandalone

      public boolean isStandalone()
      Returns if this XML is standalone
      Specified by:
      isStandalone in interface StartDocument
      Returns:
      the standalone state of XML, defaults to "no"
    • standaloneSet

      public boolean standaloneSet()
      Returns true if the standalone attribute was set in the encoding declaration of the document.
      Specified by:
      standaloneSet in interface StartDocument
    • getVersion

      public String getVersion()
      Returns the version of XML of this XML stream
      Specified by:
      getVersion in interface StartDocument
      Returns:
      the version of XML, defaults to "1.0"
    • setStandalone

      public void setStandalone(boolean standalone)
    • setStandalone

      public void setStandalone(String s)
    • setEncoding

      public void setEncoding(String encoding)
    • setDeclaredEncoding

      void setDeclaredEncoding(boolean value)
    • setVersion

      public void setVersion(String s)
    • clear

      void clear()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isStartDocument

      public boolean isStartDocument()
      Specified by:
      isStartDocument in interface XMLEvent
      Overrides:
      isStartDocument in class EventBase