
public interface ASN1Decoder
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decodeBitString()
Decode the next ASN.1 element as a bit string.
|
BigInteger |
decodeBitStringAsInteger()
Decode the next ASN.1 element as a bit string where the value is a ASN.1 INTEGER.
|
String |
decodeBitStringAsString()
Decode the next ASN.1 element as a bit string.
|
default String |
decodeBMPString()
Decode the next ASN.1 element as an BMPString.
|
default byte[] |
decodeBMPStringAsBytes()
Decode the next ASN.1 element as an BMPString.
|
boolean |
decodeBoolean()
Decode the next ASN.1 element as a boolean value.
|
String |
decodeIA5String()
Decode the next ASN.1 element as an IA5 string.
|
byte[] |
decodeIA5StringAsBytes()
Decode the next ASN.1 element as an IA5 string.
|
void |
decodeImplicit(int number)
Indicate that the next ASN.1 element has the given implicit, context-specific tag.
|
void |
decodeImplicit(int clazz,
int number)
Indicate that the next ASN.1 element has the given implicit tag.
|
BigInteger |
decodeInteger()
Decode the next ASN.1 element as an integer.
|
void |
decodeNull()
Decode the next ASN.1 element as a null element.
|
String |
decodeObjectIdentifier()
Decode the next ASN.1 element as an object identifier.
|
byte[] |
decodeOctetString()
Decode the next ASN.1 element as an octet string.
|
String |
decodeOctetStringAsString()
Decode the next ASN.1 element as an octet string.
|
String |
decodeOctetStringAsString(String charSet)
Decode the next ASN.1 element as an octet string.
|
String |
decodePrintableString()
Decode the next ASN.1 element as a PrintableString.
|
byte[] |
decodePrintableStringAsBytes()
Decode the next ASN.1 element as a PrintableString.
|
default String |
decodeUniversalString()
Decode the next ASN.1 element as an UniversalString.
|
default byte[] |
decodeUniversalStringAsBytes()
Decode the next ASN.1 element as an UniversalString.
|
default String |
decodeUtf8String()
Decode the next ASN.1 element as an UTF8String.
|
default byte[] |
decodeUtf8StringAsBytes()
Decode the next ASN.1 element as an UTF8String.
|
byte[] |
drain()
Drain all of the remaining bytes from the input stream.
|
byte[] |
drainElement()
Drain all of the bytes from the next ASN.1 element.
|
byte[] |
drainElementValue()
Drain the value bytes from the next ASN.1 element.
|
void |
endExplicit()
Advance to the end of an explicitly tagged element.
|
void |
endSequence()
Advance to the end of a sequence.
|
void |
endSet()
Advance to the end of a set.
|
void |
endSetOf()
Advance to the end of a "set of" element.
|
boolean |
hasNextElement()
Determine if there is at least one more ASN.1 element that can be read.
|
boolean |
isNextType(int clazz,
int number,
boolean isConstructed)
Determine if the type of the next ASN.1 element matches the given type without
actually decoding the next element.
|
int |
peekType()
Retrieve the type of the next ASN.1 element without actually decoding
the next element.
|
void |
skipElement()
Skip over the next ASN.1 element.
|
void |
startExplicit(int number)
Start decoding an ASN.1 explicitly tagged element.
|
void |
startExplicit(int clazz,
int number)
Start decoding an ASN.1 explicitly tagged element.
|
void |
startSequence()
Start decoding an ASN.1 sequence.
|
void |
startSet()
Start decoding an ASN.1 set.
|
void |
startSetOf()
Start decoding an ASN.1 "set of" element.
|
void startSequence()
throws ASN1Exception
endSequence() is called.ASN1Exception - if the next element is not a sequencevoid endSequence()
throws ASN1Exception
ASN1Exception - if an error occurs while advancing to the end of the sequencevoid startSet()
throws ASN1Exception
endSet() is called.ASN1Exception - if the next element is not a setvoid endSet()
throws ASN1Exception
ASN1Exception - if an error occurs while advancing to the end of the setvoid startSetOf()
throws ASN1Exception
endSetOf() is called.ASN1Exception - if the next element is not a setvoid endSetOf()
throws ASN1Exception
ASN1Exception - if an error occurs while advancing to the end of the setvoid startExplicit(int number)
throws ASN1Exception
endExplicit()
is called.number - the tag number for the explicit, context-specific tagASN1Exception - if the next element's type does not match the given typevoid startExplicit(int clazz,
int number)
throws ASN1Exception
endExplicit()
is called.clazz - the class for the explicit tagnumber - the tag number for the explicit tagASN1Exception - if the next element's type does not match the given typevoid endExplicit()
throws ASN1Exception
ASN1Exception - if an error occurs while advancing to the end of the explicitly
tagged elementbyte[] decodeOctetString()
throws ASN1Exception
ASN1Exception - if the next element is not an octet stringString decodeOctetStringAsString() throws ASN1Exception
ASN1Exception - if the next element is not an octet stringString decodeOctetStringAsString(String charSet) throws ASN1Exception
charSet - the character set to use when decodingASN1Exception - if the next element is not an octet stringString decodeIA5String() throws ASN1Exception
ASN1Exception - if the next element is not an IA5 stringbyte[] decodeIA5StringAsBytes()
throws ASN1Exception
ASN1Exception - if the next element is not an IA5 stringbyte[] decodeBitString()
throws ASN1Exception
ASN1Exception - if the next element is not a bit stringBigInteger decodeBitStringAsInteger()
BigInteger decoded from the bit stringASN1Exception - if the next element is not a bit string or its value is not an integerString decodeBitStringAsString() throws ASN1Exception
ASN1Exception - if the next element is not a bit stringString decodePrintableString() throws ASN1Exception
ASN1Exception - if the next element is not a PrintableStringbyte[] decodePrintableStringAsBytes()
throws ASN1Exception
ASN1Exception - if the next element is not a PrintableStringdefault String decodeUniversalString() throws ASN1Exception
ASN1Exception - if the next element is not a UniversalStringUnsupportedOperationException - if this implementation does not provide this methoddefault byte[] decodeUniversalStringAsBytes()
throws ASN1Exception
ASN1Exception - if the next element is not a UniversalStringUnsupportedOperationException - if this implementation does not provide this methoddefault String decodeUtf8String() throws ASN1Exception
ASN1Exception - if the next element is not a UTF8StringUnsupportedOperationException - if this implementation does not provide this methoddefault byte[] decodeUtf8StringAsBytes()
throws ASN1Exception
ASN1Exception - if the next element is not a UTF8StringUnsupportedOperationException - if this implementation does not provide this methoddefault String decodeBMPString() throws ASN1Exception
ASN1Exception - if the next element is not a BMPStringUnsupportedOperationException - if this implementation does not provide this methoddefault byte[] decodeBMPStringAsBytes()
throws ASN1Exception
ASN1Exception - if the next element is not a BMPStringUnsupportedOperationException - if this implementation does not provide this methodString decodeObjectIdentifier() throws ASN1Exception
ASN1Exception - if the next element is not a bit stringBigInteger decodeInteger()
ASN1Exception - if the next element is not an integervoid decodeNull()
throws ASN1Exception
ASN1Exception - if the next element is not nullvoid decodeImplicit(int number)
number - the tag number for the implicit tagvoid decodeImplicit(int clazz,
int number)
clazz - the class for the implicit tagnumber - the tag number for the implicit tagboolean decodeBoolean()
throws ASN1Exception
ASN1Exception - if the next element is not a boolean valueboolean isNextType(int clazz,
int number,
boolean isConstructed)
clazz - the tag class to match againstnumber - the tag number to match againstisConstructed - whether or not the next element should be constructedtrue if the type of the next ASN.1 element matches the given type
and false otherwiseint peekType()
throws ASN1Exception
ASN1Exception - if an error occurs while determining the type of the next elementvoid skipElement()
throws ASN1Exception
ASN1Exception - if the next element cannot be skippedboolean hasNextElement()
true if there is at least one more ASN.1 element that can be read and false otherwisebyte[] drainElementValue()
throws ASN1Exception
ASN1Exception - if the value bytes from the next ASN.1 element cannot be obtainedbyte[] drainElement()
throws ASN1Exception
ASN1Exception - if the bytes from the next ASN.1 element cannot be obtainedbyte[] drain()
Copyright © 2020 JBoss by Red Hat. All rights reserved.