public class StreamReader
extends java.lang.Object
Constructor and Description |
---|
StreamReader(java.io.Reader reader) |
StreamReader(java.lang.String stream) |
Modifier and Type | Method and Description |
---|---|
void |
forward() |
void |
forward(int length)
read the next length characters and move the pointer.
|
int |
getColumn() |
java.nio.charset.Charset |
getEncoding() |
int |
getIndex() |
int |
getLine() |
Mark |
getMark() |
static boolean |
isPrintable(int c) |
static boolean |
isPrintable(java.lang.String data) |
int |
peek() |
int |
peek(int index)
Peek the next index-th code point
|
java.lang.String |
prefix(int length)
peek the next length code points
|
java.lang.String |
prefixForward(int length)
prefix(length) immediately followed by forward(length)
|
public StreamReader(java.lang.String stream)
public StreamReader(java.io.Reader reader)
public static boolean isPrintable(java.lang.String data)
public static boolean isPrintable(int c)
public Mark getMark()
public void forward()
public void forward(int length)
length
- amount of characters to move forwardpublic int peek()
public int peek(int index)
index
- to peekpublic java.lang.String prefix(int length)
length
- amount of the characters to peekpublic java.lang.String prefixForward(int length)
length
- amount of characters to getpublic int getColumn()
public java.nio.charset.Charset getEncoding()
public int getIndex()
public int getLine()