Package com.ctc.wstx.ent
Class IntEntity
- java.lang.Object
-
- org.codehaus.stax2.ri.evt.BaseEventImpl
-
- com.ctc.wstx.evt.WEntityDeclaration
-
- com.ctc.wstx.ent.EntityDecl
-
- com.ctc.wstx.ent.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.LocationmContentLocationLocation where entity content definition started; points to the starting/opening quote for internal entities.(package private) char[]mReplReplacement text of the entity; full array contents.(package private) java.lang.StringmReplText-
Fields inherited from class com.ctc.wstx.ent.EntityDecl
mContext, mDeclaredExternally, mName
-
-
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)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IntEntitycreate(java.lang.String id, char[] val)static IntEntitycreate(java.lang.String id, java.lang.String repl)WstxInputSourceexpand(WstxInputSource parent, javax.xml.stream.XMLResolver res, ReaderConfig cfg, int xmlVersion)Method called to create the new input source through which expansion value of the entity can be read.java.lang.StringgetNotationName()java.lang.StringgetPublicId()char[]getReplacementChars()Gives raw access to replacement text data...java.lang.StringgetReplacementText()intgetReplacementText(java.io.Writer w)java.lang.StringgetSystemId()booleanisExternal()booleanisParsed()voidwriteEnc(java.io.Writer w)-
Methods inherited from class com.ctc.wstx.ent.EntityDecl
getBaseURI, getName, getReplacementTextLength, markAsExternallyDeclared, wasDeclaredExternally
-
Methods inherited from class com.ctc.wstx.evt.WEntityDeclaration
equals, getEventType, hashCode, writeAsEncodedUnicode, writeUsing
-
Methods inherited from class org.codehaus.stax2.ri.evt.BaseEventImpl
addHash, asCharacters, asEndElement, asStartElement, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, iteratedEquals, stringsWithNullsEqual, throwFromIOE, toString
-
-
-
-
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
-
-
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:
getNotationNamein interfacejavax.xml.stream.events.EntityDeclaration- Specified by:
getNotationNamein classEntityDecl
-
getPublicId
public java.lang.String getPublicId()
- Specified by:
getPublicIdin interfacejavax.xml.stream.events.EntityDeclaration- Specified by:
getPublicIdin classEntityDecl
-
getReplacementText
public java.lang.String getReplacementText()
- Specified by:
getReplacementTextin interfacejavax.xml.stream.events.EntityDeclaration- Specified by:
getReplacementTextin classEntityDecl
-
getReplacementText
public int getReplacementText(java.io.Writer w) throws java.io.IOException- Specified by:
getReplacementTextin classEntityDecl- Throws:
java.io.IOException
-
getSystemId
public java.lang.String getSystemId()
- Specified by:
getSystemIdin interfacejavax.xml.stream.events.EntityDeclaration- Specified by:
getSystemIdin classEntityDecl
-
writeEnc
public void writeEnc(java.io.Writer w) throws java.io.IOException- Specified by:
writeEncin classEntityDecl- 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:
getReplacementCharsin classEntityDecl
-
isExternal
public boolean isExternal()
- Specified by:
isExternalin classEntityDecl
-
isParsed
public boolean isParsed()
- Specified by:
isParsedin classEntityDecl
-
expand
public WstxInputSource expand(WstxInputSource parent, javax.xml.stream.XMLResolver res, ReaderConfig cfg, int xmlVersion)
Description copied from class:EntityDeclMethod called to create the new input source through which expansion value of the entity can be read.- Specified by:
expandin classEntityDecl
-
-