Class FormatReaderParsed
java.lang.Object
us.irdev.bedrock.bag.formats.FormatReader
us.irdev.bedrock.bag.formats.FormatReaderParsed
- Direct Known Subclasses:
FormatReaderDelimited
,FormatReaderJson
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected int
protected int
protected int
protected int
protected static final char
protected static final String
protected final char[]
Fields inherited from class us.irdev.bedrock.bag.formats.FormatReader
input
-
Constructor Summary
ModifierConstructorDescriptionprotected
FormatReaderParsed
(String input) FormatReaderParsed
(String input, boolean newLineIsWhitespace) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
check()
protected int
consumeUntil
(char[] stopChars, boolean allowEscape) protected int
consumeWhile
(char[] inChars, boolean allowEscape) protected void
protected boolean
expect
(char c) protected boolean
expect
(char[] chars) protected boolean
protected boolean
in
(char[] inChars, char c) protected boolean
inspectForNewLine
(char c) protected boolean
notIn
(char[] inChars, char c) protected void
onReadError
(String errorMessage) protected String
readBareValueUntil
(char[] stopChars) protected String
readBareValueWhile
(char[] inChars) protected String
readString
(char[] stopChars) protected boolean
protected boolean
require
(char c) protected boolean
require
(char[] chars) protected boolean
Methods inherited from class us.irdev.bedrock.bag.formats.FormatReader
readBagArray, readBagObject, register, registerFormatReader
-
Field Details
-
index
protected int index -
inputLength
protected int inputLength -
lineNumber
protected int lineNumber -
lastLineIndex
protected int lastLineIndex -
error
protected boolean error -
WHITESPACE_CHARS
- See Also:
-
NEW_LINE
protected static final char NEW_LINE- See Also:
-
whitespaceChars
protected final char[] whitespaceChars
-
-
Constructor Details
-
FormatReaderParsed
protected FormatReaderParsed() -
FormatReaderParsed
-
FormatReaderParsed
-
-
Method Details
-
notIn
protected boolean notIn(char[] inChars, char c) -
in
protected boolean in(char[] inChars, char c) -
check
protected boolean check()- Returns:
-
inspectForNewLine
protected boolean inspectForNewLine(char c) -
consumeWhile
protected int consumeWhile(char[] inChars, boolean allowEscape) -
consumeWhitespace
protected void consumeWhitespace() -
consumeUntil
protected int consumeUntil(char[] stopChars, boolean allowEscape) -
expect
protected boolean expect(char c) - Parameters:
c
-- Returns:
-
expect
protected boolean expect(char[] chars) -
expect
-
require
protected boolean require(char c) - Parameters:
c
-- Returns:
-
require
protected boolean require(char[] chars) -
require
-
require
- Parameters:
condition
-explanation
-- Returns:
-
onReadError
- Parameters:
errorMessage
-
-
readString
-
readBareValueUntil
-
readBareValueWhile
-