Class FormatReaderParsed
java.lang.Object
us.irdev.bedrock.bag.formats.FormatReader
us.irdev.bedrock.bag.formats.FormatReaderParsed
- Direct Known Subclasses:
FormatReaderDelimited,FormatReaderJson
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected intprotected intprotected intprotected intprotected static final charprotected static final Stringprotected final char[]Fields inherited from class us.irdev.bedrock.bag.formats.FormatReader
input -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFormatReaderParsed(String input) FormatReaderParsed(String input, boolean newLineIsWhitespace) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheck()protected intconsumeUntil(char[] stopChars, boolean allowEscape) protected intconsumeWhile(char[] inChars, boolean allowEscape) protected voidprotected booleanexpect(char c) protected booleanexpect(char[] chars) protected booleanprotected booleanin(char[] inChars, char c) protected booleaninspectForNewLine(char c) protected booleannotIn(char[] inChars, char c) protected voidonReadError(String errorMessage) protected StringreadBareValueUntil(char[] stopChars) protected StringreadBareValueWhile(char[] inChars) protected StringreadString(char[] stopChars) protected booleanprotected booleanrequire(char c) protected booleanrequire(char[] chars) protected booleanMethods 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
-