public interface TokenizerSource
This interface describes the data source for a Tokenizer. It is a
simplification of the Reader class (java.io.Reader).
Tokenizer| Modifier and Type | Method and Description |
|---|---|
int |
read(char[] cbuf,
int offset,
int maxChars)
A basic method to supply character data for a
Tokenizer. |
int read(char[] cbuf,
int offset,
int maxChars)
throws java.lang.Exception
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.
Reader this method
returns -1 on end-of-file (EOF).cbuf - buffer to receive dataoffset - position from where the data should be inserted in cbufmaxChars - maximum number of characters to be read into cbufjava.lang.Exception - anything that could happen during read, most likely IOException