public final class StreamReader extends Object
| Constructor and Description |
|---|
StreamReader(LoadSettings loadSettings,
Reader reader)
Create
|
StreamReader(LoadSettings loadSettings,
String stream)
Create
|
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)
|
@Deprecated public StreamReader(Reader reader, LoadSettings loadSettings)
loadSettings - - configuration optionsreader - - the inputpublic StreamReader(LoadSettings loadSettings, Reader reader)
loadSettings - - configuration optionsreader - - the input@Deprecated public StreamReader(String stream, LoadSettings loadSettings)
stream - - the inputloadSettings - - configuration optionspublic StreamReader(LoadSettings loadSettings, String stream)
loadSettings - - configuration optionsstream - - the inputpublic 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.