public class Asn1JsonDecodeBuffer extends Asn1MessageBufferBase
context, mTypeCode
Constructor and Description |
---|
Asn1JsonDecodeBuffer(java.io.InputStream stream)
Create Asn1JsonDecodeBuffer on the given input byte stream.
|
Asn1JsonDecodeBuffer(java.io.Reader reader)
Create Asn1JsonDecodeBuffer on the given reader.
|
Modifier and Type | Method and Description |
---|---|
boolean |
nextCharacterIs(char c)
Returns true if the next character is the given character.
|
boolean |
nextCharacterIsNot(char c)
Returns true if the next character not the given character.
|
boolean |
readBoolean()
Reads "true" or "false" from input and returns the corresponding
boolean value.
|
void |
readCharacter(char matchChar)
Read the given character from input.
|
int |
readInt()
Convenience method equivalent to Integer.parseInt( this.readNumber() )
|
java.lang.String |
readJsonValue()
Read the next JSON value from the input.
|
void |
readNull()
Reads "null" from input.
|
java.lang.String |
readNumber()
Read a JSON number from input.
|
java.lang.String |
readString()
Read a JSON string from the input.
|
void |
readString(java.lang.String expectedValue)
Convenience method which invokes readString() and throws an exception
if the result is not the expectedValue.
|
int |
seekCharacter()
Seeks past whitespace in the input to find the next input character.
|
void |
skipWhitespace()
Skip (read past) all whitespace on input until there is no more input or
a nonwhitespace character is the next character of input.
|
getContext, hexDump, hexDump, setKey, setTypeCode
public Asn1JsonDecodeBuffer(java.io.Reader reader)
public Asn1JsonDecodeBuffer(java.io.InputStream stream)
stream
- public void skipWhitespace() throws java.io.IOException
java.io.IOException
public boolean nextCharacterIs(char c) throws java.io.IOException
java.io.IOException
public boolean nextCharacterIsNot(char c) throws java.io.IOException
java.io.IOException
public int seekCharacter() throws java.io.IOException
java.io.IOException
public void readCharacter(char matchChar) throws java.io.IOException
matchChar
- The character expected on input.Asn1Exception
- if the expected character token is not presentjava.io.IOException
public int readInt() throws java.io.IOException
java.io.IOException
public java.lang.String readNumber() throws java.io.IOException
java.io.IOException
public java.lang.String readJsonValue() throws java.io.IOException
Asn1Exception
- if a JSON value cannot be read.java.io.IOException
public void readString(java.lang.String expectedValue) throws java.io.IOException
expectedValue
- java.io.IOException
public java.lang.String readString() throws java.io.IOException
Asn1Exception
- if a JSON string is not on input.java.io.IOException
public boolean readBoolean() throws java.io.IOException
Asn1Exception
- if a literal true or false value is not on input.java.io.IOException
public void readNull() throws java.io.IOException
Asn1Exception
- if a literal null value is not on input.java.io.IOException