Class IntEntity

  • All Implemented Interfaces:
    javax.xml.stream.events.EntityDeclaration, javax.xml.stream.events.XMLEvent, javax.xml.stream.XMLStreamConstants, org.codehaus.stax2.evt.XMLEvent2

    public class IntEntity
    extends EntityDecl
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javax.xml.stream.Location mContentLocation
      Location where entity content definition started; points to the starting/opening quote for internal entities.
      (package private) char[] mRepl
      Replacement text of the entity; full array contents.
      (package private) java.lang.String mReplText  
      • Fields inherited from class org.codehaus.stax2.ri.evt.BaseEventImpl

        mLocation
      • Fields inherited from interface javax.xml.stream.XMLStreamConstants

        ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
    • Constructor Summary

      Constructors 
      Constructor Description
      IntEntity​(javax.xml.stream.Location loc, java.lang.String name, java.net.URL ctxt, char[] repl, javax.xml.stream.Location defLoc)  
    • Field Detail

      • mContentLocation

        protected final javax.xml.stream.Location mContentLocation
        Location where entity content definition started; points to the starting/opening quote for internal entities.
      • mRepl

        final char[] mRepl
        Replacement text of the entity; full array contents.
      • mReplText

        java.lang.String mReplText
    • Constructor Detail

      • IntEntity

        public IntEntity​(javax.xml.stream.Location loc,
                         java.lang.String name,
                         java.net.URL ctxt,
                         char[] repl,
                         javax.xml.stream.Location defLoc)
    • Method Detail

      • create

        public static IntEntity create​(java.lang.String id,
                                       java.lang.String repl)
      • create

        public static IntEntity create​(java.lang.String id,
                                       char[] val)
      • getNotationName

        public java.lang.String getNotationName()
        Specified by:
        getNotationName in interface javax.xml.stream.events.EntityDeclaration
        Specified by:
        getNotationName in class EntityDecl
      • getPublicId

        public java.lang.String getPublicId()
        Specified by:
        getPublicId in interface javax.xml.stream.events.EntityDeclaration
        Specified by:
        getPublicId in class EntityDecl
      • getReplacementText

        public java.lang.String getReplacementText()
        Specified by:
        getReplacementText in interface javax.xml.stream.events.EntityDeclaration
        Specified by:
        getReplacementText in class EntityDecl
      • getReplacementText

        public int getReplacementText​(java.io.Writer w)
                               throws java.io.IOException
        Specified by:
        getReplacementText in class EntityDecl
        Throws:
        java.io.IOException
      • getSystemId

        public java.lang.String getSystemId()
        Specified by:
        getSystemId in interface javax.xml.stream.events.EntityDeclaration
        Specified by:
        getSystemId in class EntityDecl
      • writeEnc

        public void writeEnc​(java.io.Writer w)
                      throws java.io.IOException
        Specified by:
        writeEnc in class EntityDecl
        Throws:
        java.io.IOException
      • getReplacementChars

        public char[] getReplacementChars()
        Gives raw access to replacement text data...

        Note: this is not really safe, as caller can modify the array, but since this method is thought to provide fast access, let's avoid making copy here.

        Specified by:
        getReplacementChars in class EntityDecl