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 |
getLazyOpenTypeDecode()
Return true if lazy open type decoding is on.
|
void |
mark()
Mark the current position so that we can read ahead, without limit,
and return to the current position by calling resetPos.
|
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 |
nextIsContentObject()
Returns true if the input contains a JSON object used to encode
a BIT STRING using the "containing" encoder's option.
|
boolean |
readBoolean()
Reads "true" or "false" from input and returns the corresponding
boolean value.
|
void |
readCharacter(char matchChar)
Read the given character from input.
|
java.lang.String |
readCharStrOctStr()
Read an ASN.1 character string that has been encoded to a JSON string
as if it were an ASN.1 octet string.
|
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.
|
void |
reset()
Return the input position to the position at which mark() was previously
called.
|
int |
seekCharacter()
Seeks past whitespace in the input to find the next input character.
|
void |
setLazyOpenTypeDecode(boolean value)
This method turns lazy open type decoding on or off.
|
void |
skipJsonValue()
Read past any leading whitespace and the next JSON value from the input.
|
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 final boolean getLazyOpenTypeDecode()
public final void skipJsonValue() throws java.io.IOException
Asn1Exception
- if a JSON value cannot be read.java.io.IOException
public final void skipWhitespace() throws java.io.IOException
java.io.IOException
public final void mark()
public final boolean nextCharacterIs(char c) throws java.io.IOException
java.io.IOException
public final boolean nextCharacterIsNot(char c) throws java.io.IOException
java.io.IOException
public final boolean nextIsContentObject() throws java.io.IOException
java.io.IOException
public final void reset()
public final int seekCharacter() throws java.io.IOException
java.io.IOException
public final void setLazyOpenTypeDecode(boolean value)
public final 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 final int readInt() throws java.io.IOException
java.io.IOException
public final java.lang.String readNumber() throws java.io.IOException
java.io.IOException
public final java.lang.String readJsonValue() throws java.io.IOException
Asn1Exception
- if a JSON value cannot be read.java.io.IOException
public final void readString(java.lang.String expectedValue) throws java.io.IOException
expectedValue
- java.io.IOException
public final java.lang.String readCharStrOctStr() throws java.io.IOException
Asn1Exception
- if a JSON string is not on input.java.io.IOException
public final java.lang.String readString() throws java.io.IOException
Asn1Exception
- if a JSON string is not on input.java.io.IOException
public final boolean readBoolean() throws java.io.IOException
Asn1Exception
- if a literal true or false value is not on input.java.io.IOException
public final void readNull() throws java.io.IOException
Asn1Exception
- if a literal null value is not on input.java.io.IOException