Class JsonReader
java.lang.Object
com.dslplatform.compiler.client.json.JsonReader
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]private intprivate byteprotected intprivate final char[]private intprivate static final Charsetprivate static final boolean[] -
Constructor Summary
ConstructorsModifierConstructorDescriptionJsonReader(byte[] buffer, int length) JsonReader(byte[] buffer, int length, char[] tmp) privateJsonReader(char[] tmp, byte[] buffer, int length) -
Method Summary
Modifier and TypeMethodDescriptionfinal intfinal bytefinal intprivate static inthexToInt(byte value) (package private) booleanfinal bytelast()intlength()final longbyteread()final char[]final StringtoString()final booleanwasFalse()final booleanwasNull()final booleanwasTrue()private boolean
-
Field Details
-
WHITESPACE
private static final boolean[] WHITESPACE -
tokenStart
private int tokenStart -
currentIndex
private int currentIndex -
last
private byte last -
length
protected int length -
tmp
private final char[] tmp -
buffer
private final byte[] buffer -
UTF_8
-
-
Constructor Details
-
JsonReader
private JsonReader(char[] tmp, byte[] buffer, int length) -
JsonReader
- Throws:
IOException
-
JsonReader
- Throws:
IOException
-
-
Method Details
-
length
public int length() -
toString
-
read
- Throws:
IOException
-
isEndOfStream
- Throws:
IOException
-
last
public final byte last() -
getTokenStart
public final int getTokenStart() -
getCurrentIndex
public final int getCurrentIndex() -
readNumber
public final char[] readNumber() -
readString
- Throws:
IOException
-
hexToInt
- Throws:
IOException
-
wasWhiteSpace
private boolean wasWhiteSpace() -
getNextToken
- Throws:
IOException
-
positionInStream
public final long positionInStream() -
wasNull
- Throws:
IOException
-
wasTrue
- Throws:
IOException
-
wasFalse
- Throws:
IOException
-