Package org.antlr.runtime
Class ANTLRReaderStream
- java.lang.Object
-
- org.antlr.runtime.ANTLRStringStream
-
- org.antlr.runtime.ANTLRReaderStream
-
- All Implemented Interfaces:
CharStream
,IntStream
- Direct Known Subclasses:
ANTLRInputStream
public class ANTLRReaderStream extends ANTLRStringStream
Vacuum all input from a Reader and then treat it like a StringStream. Manage the buffer manually to avoid unnecessary data copying. If you need encoding, use ANTLRInputStream.
-
-
Field Summary
Fields Modifier and Type Field Description static int
INITIAL_BUFFER_SIZE
static int
READ_BUFFER_SIZE
-
Fields inherited from class org.antlr.runtime.ANTLRStringStream
charPositionInLine, data, lastMarker, line, markDepth, markers, n, name, p
-
Fields inherited from interface org.antlr.runtime.CharStream
EOF
-
-
Constructor Summary
Constructors Constructor Description ANTLRReaderStream()
ANTLRReaderStream(Reader r)
ANTLRReaderStream(Reader r, int size)
ANTLRReaderStream(Reader r, int size, int readChunkSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
load(Reader r, int size, int readChunkSize)
-
Methods inherited from class org.antlr.runtime.ANTLRStringStream
consume, getCharPositionInLine, getLine, getSourceName, index, LA, LT, mark, release, reset, rewind, rewind, seek, setCharPositionInLine, setLine, size, substring, toString
-
-
-
-
Field Detail
-
READ_BUFFER_SIZE
public static final int READ_BUFFER_SIZE
- See Also:
- Constant Field Values
-
INITIAL_BUFFER_SIZE
public static final int INITIAL_BUFFER_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ANTLRReaderStream
public ANTLRReaderStream()
-
ANTLRReaderStream
public ANTLRReaderStream(Reader r) throws IOException
- Throws:
IOException
-
ANTLRReaderStream
public ANTLRReaderStream(Reader r, int size) throws IOException
- Throws:
IOException
-
ANTLRReaderStream
public ANTLRReaderStream(Reader r, int size, int readChunkSize) throws IOException
- Throws:
IOException
-
-
Method Detail
-
load
public void load(Reader r, int size, int readChunkSize) throws IOException
- Throws:
IOException
-
-