|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.Reader
lp.trans.EvolpSolver.Decoder
private static class EvolpSolver.Decoder
A filtering reader that decodes logic programming constructs previously
encoded by LpEncoder. Decoding means replacing
each occurence of
| Field Summary | |
|---|---|
private char[] |
buffer
A small buffer used in case a single character in the original input corresponds to more characters after the decoding filter is applied. |
private Reader |
in
The underlying Reader. |
private int |
top
Position in the buffer. |
| Fields inherited from class java.io.Reader |
|---|
lock |
| Constructor Summary | |
|---|---|
EvolpSolver.Decoder(Reader in)
Creates a new instance of Decoder that filters the contents
of in. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the underlying Reader. |
int |
read()
Returns the next character after applying the filter to the original input. |
int |
read(char[] cbuf,
int off,
int len)
Reads to a character buffer. |
| 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 |
| Field Detail |
|---|
private final Reader in
Reader.
private final char[] buffer
private int top
| Constructor Detail |
|---|
public EvolpSolver.Decoder(Reader in)
Decoder that filters the contents
of in.
in - the underlying Reader| Method Detail |
|---|
public int read()
throws IOException
read in class ReaderIOException - if an I/O error occurs while reading from the
underlying Reader
public int read(char[] cbuf,
int off,
int len)
throws IOException
read in class Readercbuf - destination bufferoff - offset at which to start storing characterslen - maximum number of characters to read
IOException - if an I/O error occurs while reading from the
underlying Reader
public void close()
throws IOException
Reader.
close in interface Closeableclose in class ReaderIOException - if an I/O error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||