public final class StreamReader extends Object
| Constructor and Description |
|---|
StreamReader(LoadSettings loadSettings,
Reader reader) |
StreamReader(LoadSettings loadSettings,
String stream) |
StreamReader(Reader reader,
LoadSettings loadSettings)
Deprecated.
use the other constructor with LoadSettings first
|
StreamReader(String stream,
LoadSettings loadSettings)
Deprecated.
use the other constructor with LoadSettings first
|
| Modifier and Type | Method and Description |
|---|---|
void |
forward()
read the next character and move the pointer.
|
void |
forward(int length)
read the next length characters and move the pointer.
|
int |
getColumn() |
int |
getIndex() |
int |
getLine() |
Optional<Mark> |
getMark()
Generate
Mark if it is configured |
static boolean |
isPrintable(int c)
Check if the code point is human-readable
|
static boolean |
isPrintable(String data)
Check if the all the data is human-readable (used in Representer)
|
int |
peek()
Peek the next code point (look without moving the pointer)
|
int |
peek(int index)
Peek the next index-th code point
|
String |
prefix(int length)
Create String from code points
|
String |
prefixForward(int length)
prefix(length) immediately followed by forward(length)
|
public StreamReader(Reader reader, LoadSettings loadSettings)
public StreamReader(LoadSettings loadSettings, Reader reader)
public StreamReader(String stream, LoadSettings loadSettings)
public StreamReader(LoadSettings loadSettings, String stream)
public static boolean isPrintable(String data)
data - - content to be checked for human-readabilitypublic static boolean isPrintable(int c)
c - - code point to be checked for human-readabilitypublic void forward()
public void forward(int length)
length - amount of characters to move forwardpublic int peek()
public int peek(int index)
index - to peekpublic String prefix(int length)
length - amount of the characters to convertpublic String prefixForward(int length)
length - amount of characters to getpublic int getColumn()
public int getIndex()
public int getLine()
Copyright © 2018–2022. All rights reserved.