public abstract class AbstractASN1Reader extends Object implements ASN1Reader
ASN1Reader which can be used as the basis for
implementing new ASN1 reader implementations.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractASN1Reader()
Creates a new abstract ASN.1 reader.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
readBoolean(byte type)
Reads the next element as a boolean having the provided type tag.
|
int |
readEnumerated(byte type)
Reads the next element as an enumerated having the provided type tag.
|
long |
readInteger(byte type)
Reads the next element as an integer having the provided type tag.
|
void |
readNull(byte type)
Reads the next element as a null element having the provided type tag.
|
ByteString |
readOctetString(byte type)
Reads the next element as an octet string having the provided type tag.
|
ByteStringBuilder |
readOctetString(byte type,
ByteStringBuilder builder)
Reads the next element as an octet string having the provided type tag
and appends it to the provided
ByteStringBuilder. |
String |
readOctetStringAsString(byte type)
Reads the next element as an octet string having the provided type tag
and decodes the value as a UTF-8 encoded string.
|
void |
readStartExplicitTag(byte type)
Reads the next element as an explicit tag having the provided tag type.
|
void |
readStartSequence(byte type)
Reads the next element as a sequence having the provided type tag.
|
void |
readStartSet(byte type)
Reads the next element as a set having the provided type tag.
|
ASN1Reader |
skipElement(byte expectedType)
Skips the next element having the provided type tag without decoding it.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, elementAvailable, hasNextElement, peekLength, peekType, readBoolean, readEndExplicitTag, readEndSequence, readEndSet, readEnumerated, readInteger, readNull, readOctetString, readOctetString, readOctetStringAsString, readStartExplicitTag, readStartSequence, readStartSet, skipElementprotected AbstractASN1Reader()
public boolean readBoolean(byte type) throws IOException
readBoolean in interface ASN1Readertype - The expected type tag of the element.DecodeException - If the element cannot be decoded as a boolean.IOException - If an unexpected IO error occurred.public int readEnumerated(byte type) throws IOException
readEnumerated in interface ASN1Readertype - The expected type tag of the element.DecodeException - If the element cannot be decoded as an enumerated value.IOException - If an unexpected IO error occurred.public long readInteger(byte type) throws IOException
readInteger in interface ASN1Readertype - The expected type tag of the element.DecodeException - If the element cannot be decoded as an integer.IOException - If an unexpected IO error occurred.public void readNull(byte type) throws IOException
readNull in interface ASN1Readertype - The expected type tag of the element.DecodeException - If the element cannot be decoded as a null element.IOException - If an unexpected IO error occurred.public ByteString readOctetString(byte type) throws IOException
readOctetString in interface ASN1Readertype - The expected type tag of the element.ByteString.DecodeException - If the element cannot be decoded as an octet string.IOException - If an unexpected IO error occurred.public ByteStringBuilder readOctetString(byte type, ByteStringBuilder builder) throws IOException
ByteStringBuilder.readOctetString in interface ASN1Readertype - The expected type tag of the element.builder - The ByteStringBuilder to append the octet string to.builder.DecodeException - If the element cannot be decoded as an octet string.IOException - If an unexpected IO error occurred.public String readOctetStringAsString(byte type) throws IOException
readOctetStringAsString in interface ASN1Readertype - The expected type tag of the element.DecodeException - If the element cannot be decoded as an octet string.IOException - If an unexpected IO error occurred.public void readStartExplicitTag(byte type) throws IOException
ASN1Reader.readEndExplicitTag() is called.readStartExplicitTag in interface ASN1Readertype - The expected type tag of the element.DecodeException - If the element cannot be decoded as an explicit tag.IOException - If an unexpected IO error occurred.public void readStartSequence(byte type) throws IOException
ASN1Reader.readEndSequence() is called.readStartSequence in interface ASN1Readertype - The expected type tag of the element.DecodeException - If the element cannot be decoded as a sequence.IOException - If an unexpected IO error occurred.public void readStartSet(byte type) throws IOException
ASN1Reader.readEndSet() is
called.readStartSet in interface ASN1Readertype - The expected type tag of the element.DecodeException - If the element cannot be decoded as a set.IOException - If an unexpected IO error occurred.public ASN1Reader skipElement(byte expectedType) throws IOException
skipElement in interface ASN1ReaderexpectedType - The expected type tag of the element.DecodeException - If the next element does not have the provided type tag.IOException - If an unexpected IO error occurred.Copyright © 2011-2015 ForgeRock AS. All Rights Reserved.