| de.susebox.jtopas.TokenizerSource
All known Subclasses: de.susebox.jtopas.ReaderSource,
TokenizerSource | public interface TokenizerSource (Code) | |
This interface describes the data source for a
Tokenizer . It is a
simplification of the
java.io.Reader class (java.io.Reader ).
See Also: Tokenizer author: Heiko Blau |
Method Summary | |
int | read(char[] cbuf, int offset, int maxChars) A basic method to supply character data for a
Tokenizer . |
read | int read(char[] cbuf, int offset, int maxChars) throws Exception(Code) | | A basic method to supply character data for a
Tokenizer . Note that
the more complicated operations of buffering, skipping etc. are done by
the Tokenizer implementation using this data source. An implementation
of this interface should therefore avoid caching data itself. Otherwise,
storing data is done twice wasting memory.
In correspondence to the methods in
java.io.Reader this method
returns -1 on end-of-file (EOF).
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 |
|
|