com.ctc.wstx.io
Class BambooUTF8Reader
java.lang.Object
java.io.Reader
com.ctc.wstx.io.BambooUTF8Reader
- All Implemented Interfaces:
- java.io.Closeable, java.lang.Readable
public final class BambooUTF8Reader
- extends java.io.Reader
Optimized Reader that reads UTF-8 encoded content from an input stream. In addition to doing (hopefully) optimal
conversion, it can also take array of "pre-read" (leftover) bytes; this is necessary when preliminary stream/reader
is trying to figure out XML encoding.
Fields inherited from class java.io.Reader |
lock |
Constructor Summary |
BambooUTF8Reader(com.ctc.wstx.api.ReaderConfig cfg,
java.io.InputStream in,
byte[] buf,
int ptr,
int len,
boolean recycleBuffer)
|
Methods inherited from class java.io.Reader |
mark, markSupported, read, read, ready, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NULL_CHAR
protected static final char NULL_CHAR
- See Also:
- Constant Field Values
NULL_BYTE
protected static final char NULL_BYTE
- See Also:
- Constant Field Values
CONVERT_NEL_TO
protected static final char CONVERT_NEL_TO
- See Also:
- Constant Field Values
CONVERT_LSEP_TO
protected static final char CONVERT_LSEP_TO
- See Also:
- Constant Field Values
mIn
protected java.io.InputStream mIn
mBuffer
protected byte[] mBuffer
mPtr
protected int mPtr
mLength
protected int mLength
BambooUTF8Reader
public BambooUTF8Reader(com.ctc.wstx.api.ReaderConfig cfg,
java.io.InputStream in,
byte[] buf,
int ptr,
int len,
boolean recycleBuffer)
setXmlCompliancy
public void setXmlCompliancy(int xmlVersion)
read
public int read(char[] cbuf,
int start,
int len)
throws java.io.IOException
- Specified by:
read
in class java.io.Reader
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Specified by:
close
in class java.io.Reader
- Throws:
java.io.IOException
read
public int read()
throws java.io.IOException
- Overrides:
read
in class java.io.Reader
- Throws:
java.io.IOException
freeBuffers
public final void freeBuffers()
reportBounds
protected void reportBounds(char[] arg0,
int arg1,
int arg2)
throws java.io.IOException
- Throws:
java.io.IOException
reportStrangeStream
protected void reportStrangeStream()
throws java.io.IOException
- Throws:
java.io.IOException
reportInvalidXml11
protected void reportInvalidXml11(int arg0,
int arg1,
int arg2)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2012 Atlassian. All Rights Reserved.