public final class UTF8Reader extends BaseReader
| Modifier and Type | Field and Description |
|---|---|
(package private) int |
mByteCount
Total read byte count; used for error reporting purposes
|
(package private) int |
mCharCount
Total read character count; used for error reporting purposes
|
(package private) char |
mSurrogate |
(package private) boolean |
mXml11 |
CHAR_DEL, CONVERT_LSEP_TO, CONVERT_NEL_TO, mByteBuffer, mByteBufferEnd, mBytePtr, mConfig, mTmpBuf, NULL_BYTE, NULL_CHAR| Constructor and Description |
|---|
UTF8Reader(ReaderConfig cfg,
java.io.InputStream in,
byte[] buf,
int ptr,
int len,
boolean recycleBuffer) |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
loadMore(int available) |
int |
read(char[] cbuf,
int start,
int len) |
private void |
reportInvalid(int value,
int offset,
java.lang.String msg) |
private void |
reportInvalidInitial(int mask,
int offset) |
private void |
reportInvalidOther(int mask,
int offset) |
private void |
reportUnexpectedEOF(int gotBytes,
int needed) |
void |
setXmlCompliancy(int xmlVersion)
Method that can be called to indicate the xml conformance used
when reading content using this reader.
|
canModifyBuffer, close, freeBuffers, getStream, read, readBytes, readBytesAt, reportBounds, reportInvalidXml11, reportStrangeStreamboolean mXml11
char mSurrogate
int mCharCount
int mByteCount
public UTF8Reader(ReaderConfig cfg, java.io.InputStream in, byte[] buf, int ptr, int len, boolean recycleBuffer)
public void setXmlCompliancy(int xmlVersion)
BaseReadersetXmlCompliancy in class BaseReaderpublic int read(char[] cbuf,
int start,
int len)
throws java.io.IOException
read in class java.io.Readerjava.io.IOExceptionprivate void reportInvalidInitial(int mask,
int offset)
throws java.io.IOException
java.io.IOExceptionprivate void reportInvalidOther(int mask,
int offset)
throws java.io.IOException
java.io.IOExceptionprivate void reportUnexpectedEOF(int gotBytes,
int needed)
throws java.io.IOException
java.io.IOExceptionprivate void reportInvalid(int value,
int offset,
java.lang.String msg)
throws java.io.IOException
java.io.IOExceptionprivate boolean loadMore(int available)
throws java.io.IOException
available - Number of "unused" bytes in the input bufferjava.io.IOException