gnu.xml
Class XMLParserByte
java.lang.Object
gnu.xml.XMLParserByte
public class XMLParserByte
- extends java.lang.Object
Reads XML from a byte array.
Assumes a state-less character encoding containing ascii as a sub-set,
and where no byte in a multi-byte character is the same as a xml special
character. Any bytes with high-order bit set are treated as if they
are letters, and can be part of names.
Handles CR/LF, CDATA, entity references, processing instructions, DOCTYPE,
as well as the obvious (text, element, and attributes).
Field Summary |
protected byte[] |
buffer
|
protected java.io.InputStream |
in
|
protected int |
limit
|
protected int |
pos
|
Method Summary |
void |
error(char severity,
java.lang.String message)
|
int |
fill(byte[] buffer,
int start,
int pos)
Fill the buffer with more data. |
void |
parse()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buffer
protected byte[] buffer
pos
protected int pos
limit
protected int limit
in
protected java.io.InputStream in
XMLParserByte
public XMLParserByte(java.io.InputStream in,
ParsedXMLHandlerByte out)
XMLParserByte
public XMLParserByte(byte[] buffer,
int pos,
int limit,
ParsedXMLHandlerByte out)
XMLParserByte
public XMLParserByte(java.net.URL url,
ParsedXMLHandlerByte out)
throws java.io.IOException
- Throws:
java.io.IOException
parse
public void parse()
fill
public int fill(byte[] buffer,
int start,
int pos)
- Fill the buffer with more data.
- Parameters:
start
- start of current token.pos
- index of current read position
error
public void error(char severity,
java.lang.String message)