|
Jacson | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.Reader java.io.FilterReader de.spieleck.app.jacson.JacsonReader
Wrap a Jacson into a FilterReader
.
Field Summary | |
protected java.lang.String |
configName
The name of the configuration in filesystem |
protected Jacson |
jacson
Embedded worker Jacson |
static java.lang.String |
PIPE_BROKEN
|
protected java.io.PipedWriter |
pWriter
The piped writer Jacson writes into |
protected java.io.Reader |
reader
The embedded reader |
protected JacsonState |
rootState
The state used by this Jacson |
static java.lang.String |
WRITE_END_DEAD
XXX Message of PipedReader |
Fields inherited from class java.io.FilterReader |
in |
Fields inherited from class java.io.Reader |
lock |
Constructor Summary | |
JacsonReader(java.io.Reader reader)
Create a new Reader with a prescribed configuration. |
|
JacsonReader(java.io.Reader reader,
java.lang.String configName)
Create a new reader with prescribed input and configuration |
Method Summary | |
void |
close()
Close the stream. |
protected static boolean |
isIgnorableException(java.io.IOException io)
Check for pipe exceptions which are allowed in my context. |
void |
mark(int readAheadLimit)
Mark the present position in the stream. |
boolean |
markSupported()
Tell whether this stream supports the mark() operation. |
protected JacsonState |
obtainRootState()
Factory method for root state. |
int |
read()
Read a single character. |
int |
read(char[] cbuf,
int off,
int len)
Read characters into a portion of an array. |
boolean |
ready()
Tell whether this stream is ready to be read. |
void |
reset()
Reset the stream. |
protected void |
runJacson()
|
void |
setConfig(java.lang.String configName)
Store the name of the used Jacson configuration. |
protected void |
setupJacson()
Setup the Jacson to actually proceed. |
long |
skip(long n)
Skip characters. |
Methods inherited from class java.io.Reader |
read |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String WRITE_END_DEAD
public static final java.lang.String PIPE_BROKEN
protected Jacson jacson
protected JacsonState rootState
protected java.io.Reader reader
protected java.io.PipedWriter pWriter
protected java.lang.String configName
Constructor Detail |
public JacsonReader(java.io.Reader reader) throws JacsonConfigException, java.io.IOException
reader
- The reader providing Jacson input.public JacsonReader(java.io.Reader reader, java.lang.String configName) throws JacsonConfigException, java.io.IOException
reader
- The reader providing Jacson input.configName
- Name of Jacson configuration fileMethod Detail |
public void setConfig(java.lang.String configName)
configName
- Name of Jacson configuration fileprotected void setupJacson() throws java.io.IOException
java.io.IOException
protected JacsonState obtainRootState()
protected void runJacson()
public int read() throws java.io.IOException
java.io.IOException
- If an I/O error occurspublic int read(char[] cbuf, int off, int len) throws java.io.IOException
java.io.IOException
- If an I/O error occurspublic long skip(long n) throws java.io.IOException
java.io.IOException
- If an I/O error occurspublic boolean ready() throws java.io.IOException
java.io.IOException
- If an I/O error occurspublic boolean markSupported()
public void mark(int readAheadLimit) throws java.io.IOException
java.io.IOException
- If an I/O error occurspublic void reset() throws java.io.IOException
java.io.IOException
- If an I/O error occurspublic void close() throws java.io.IOException
java.io.IOException
- If an I/O error occursprotected static boolean isIgnorableException(java.io.IOException io)
io
- The Exception to inspect.
|
Spieleck | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |