Entity.ExternalEntity, Entity.InternalEntity, Entity.ScannedEntity| Modifier and Type | Field and Description |
|---|---|
int |
baseCharOffset
Base character offset for computing absolute character offset.
|
char[] |
ch
Character buffer.
|
int |
columnNumber
Column number.
|
int |
count
Count of characters present in buffer.
|
static int |
DEFAULT_BUFFER_SIZE
Default buffer size (4096).
|
static int |
DEFAULT_INTERNAL_BUFFER_SIZE
Default internal entity buffer size (1024).
|
static int |
DEFAULT_XMLDECL_BUFFER_SIZE
Default buffer size before we've finished with the XMLDecl:
|
String |
encoding
Auto-detected encoding.
|
XMLResourceIdentifier |
entityLocation
entity location information
|
int |
fBufferSize
Buffer size.
|
int |
fLastCount
This variable stores the number of characters read during the load()
operation.
|
int |
fTotalCountTillLastLoad
This variable is used to calculate the current position in the XML stream.
|
boolean |
isExternal |
int |
lineNumber
Line number.
|
boolean |
literal
True if in a literal.
|
boolean |
mayReadChunks |
int |
position
Position in character buffer at any point of time.
|
Reader |
reader
XXX let these field remain public right now, though we have defined methods for them.
|
int |
startPosition
Start position in character buffer.
|
InputStream |
stream
XXX let these field remain public right now, though we have defined methods for them.
|
String |
version |
boolean |
xmlDeclChunkRead |
String |
xmlVersion
XML version.
|
inExternalSubset, name| Constructor and Description |
|---|
Entity.ScannedEntity(String name,
XMLResourceIdentifier entityLocation,
InputStream stream,
Reader reader,
String encoding,
boolean literal,
boolean mayReadChunks,
boolean isExternal)
Constructs a scanned entity.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Release any resources associated with this entity.
|
String |
getEncodingName()
returns the name of the current encoding
|
InputStream |
getEntityInputStream()
if entity was opened using the stream, return the associated inputstream
with this entity
|
Reader |
getEntityReader()
Returns the java.io.Reader associated with this entity.Readers are used
to read from the file.
|
String |
getEntityVersion()
each 'external' parsed entity may have xml/text declaration containing version information
|
boolean |
isDeclaredEncoding() |
boolean |
isEncodingExternallySpecified()
Returns whether the encoding of this entity was externally specified.
|
boolean |
isExternal()
Returns true if this is an external entity.
|
boolean |
isUnparsed()
Returns true if this is an unparsed entity.
|
void |
setDeclaredEncoding(boolean value) |
void |
setEncodingExternallySpecified(boolean value)
Sets whether the encoding of this entity was externally specified.
|
void |
setEntityVersion(String version)
each 'external' parsed entity may have xml/text declaration containing version information
|
String |
toString()
Returns a string representation of this object.
|
clear, isEntityDeclInExternalSubset, setValuespublic static final int DEFAULT_BUFFER_SIZE
public int fBufferSize
public static final int DEFAULT_XMLDECL_BUFFER_SIZE
public static final int DEFAULT_INTERNAL_BUFFER_SIZE
public InputStream stream
public Reader reader
public XMLResourceIdentifier entityLocation
public String encoding
public boolean literal
public boolean isExternal
public String version
public char[] ch
public int position
public int count
public int lineNumber
public int columnNumber
public String xmlVersion
public int fTotalCountTillLastLoad
public int fLastCount
public int baseCharOffset
public int startPosition
public boolean mayReadChunks
public boolean xmlDeclChunkRead
public Entity.ScannedEntity(String name, XMLResourceIdentifier entityLocation, InputStream stream, Reader reader, String encoding, boolean literal, boolean mayReadChunks, boolean isExternal)
public String getEncodingName()
public String getEntityVersion()
public void setEntityVersion(String version)
String - version of the external parsed entitypublic Reader getEntityReader()
public InputStream getEntityInputStream()
public void close()
throws IOException
IOExceptionpublic boolean isEncodingExternallySpecified()
public void setEncodingExternallySpecified(boolean value)
public boolean isDeclaredEncoding()
public void setDeclaredEncoding(boolean value)
public final boolean isExternal()
isExternal in class Entitypublic final boolean isUnparsed()
isUnparsed in class EntityCopyright © 2018–2021 mhoffrogge. All rights reserved.