|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Reader
com.ctc.wstx.io.BaseReader
com.ctc.wstx.io.EBCDICReader
Simple baseline Reader for reading EBCDIC encoded content to be able to boostrap xml document. It is based on codepage 037 (one used in US), but will hopefully be applicable for bootstrapping other codepages as well (but not beyond).
| Field Summary | |
protected static char |
CONVERT_LSEP_TO
In xml 1.1, LSEP bit like \n, or \r. |
protected static char |
CONVERT_NEL_TO
In xml 1.1, NEL (0x85) behaves much the way \n does (can be follow \r as part of the linefeed |
protected byte[] |
mBuffer
|
protected ReaderConfig |
mConfig
|
protected java.io.InputStream |
mIn
|
protected int |
mLength
|
protected int |
mPtr
|
protected static char |
NULL_BYTE
|
protected static char |
NULL_CHAR
|
| Fields inherited from class java.io.Reader |
lock |
| Constructor Summary | |
EBCDICReader(ReaderConfig cfg,
java.io.InputStream in,
byte[] buf,
int ptr,
int len)
|
|
| Method Summary | |
void |
close()
|
void |
freeBuffers()
This method should be called along with (or instead of) normal close. |
int |
read()
Although this method is implemented by the base class, AND it should never be called by Woodstox code, let's still implement it bit more efficiently just in case |
int |
read(char[] cbuf,
int start,
int len)
|
protected void |
reportBounds(char[] cbuf,
int start,
int len)
|
protected void |
reportInvalidXml11(int value,
int bytePos,
int charPos)
|
protected void |
reportStrangeStream()
|
void |
setXmlCompliancy(int xmlVersion)
Method that can be called to indicate the xml conformance used when reading content using this reader. |
java.io.Reader |
switchIfNecessary(java.lang.String realEncoding,
char[] charBuffer,
int ptr,
int len)
|
| Methods inherited from class java.io.Reader |
mark, markSupported, read, ready, reset, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final char NULL_CHAR
protected static final char NULL_BYTE
protected static final char CONVERT_NEL_TO
protected static final char CONVERT_LSEP_TO
protected final ReaderConfig mConfig
protected java.io.InputStream mIn
protected byte[] mBuffer
protected int mPtr
protected int mLength
| Constructor Detail |
public EBCDICReader(ReaderConfig cfg,
java.io.InputStream in,
byte[] buf,
int ptr,
int len)
| Method Detail |
public void setXmlCompliancy(int xmlVersion)
com.ctc.wstx.io.BaseReader
public java.io.Reader switchIfNecessary(java.lang.String realEncoding,
char[] charBuffer,
int ptr,
int len)
throws java.io.IOException
java.io.IOException
public int read(char[] cbuf,
int start,
int len)
throws java.io.IOException
java.io.IOException
public void close()
throws java.io.IOException
java.io.IOException
public int read()
throws java.io.IOException
java.io.IOExceptionpublic final void freeBuffers()
protected void reportBounds(char[] cbuf,
int start,
int len)
throws java.io.IOException
java.io.IOException
protected void reportStrangeStream()
throws java.io.IOException
java.io.IOException
protected void reportInvalidXml11(int value,
int bytePos,
int charPos)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||