| |
|
| java.lang.Object de.susebox.jtopas.ReaderSource
ReaderSource | public class ReaderSource implements TokenizerSource(Code) | |
This implementation of the
TokenizerSource interface uses the JDK
java.io.Reader class to realize the requested functionality. Note that
the backing Reader can be changed during the parse operations of
the
Tokenizer instance that accesses this ReaderSource .
See Also: de.susebox.java.util.Tokenizer See Also: de.susebox.java.util.AbstractTokenizer author: Heiko Blau See Also: java.io.Reader |
ReaderSource | public ReaderSource()(Code) | | The default constructor constructs a ReaderSource instance
that reads from nowhere. A call to the
ReaderSource.read method will immediately
return the end-of-file condition.
See Also: ReaderSource.read |
ReaderSource | public ReaderSource(InputStream is)(Code) | | This Constructor takes an
java.io.InputStream . It is comfortable
when You dont have a
java.io.Reader in the first place. However,
when using this constructor, the method
ReaderSource.close should be called
after tokenizing has been finished. It will also close the given
InputStream .
The method accepts null leading to an end-of-file condition
in the first call to
ReaderSource.read .
Parameters: is - the input stream or null |
finalize | protected void finalize()(Code) | | Release ressources
|
read | public int read(char[] cbuf, int offset, int maxChars) throws Exception(Code) | | The method calls the
java.io.Reader.read(char[]intint) method of
the currently backing
java.io.Reader . If no Reader is set so far,
-1 (end-of-file) is returned.
Parameters: cbuf - buffer to receive data Parameters: offset - position from where the data should be inserted in cbuf Parameters: maxChars - maximum number of characters to be read into cbuf actually read characters or -1 on an end-of-file condition throws: Exception - anything that could happen during read, most likely java.io.IOException |
|
|
|