Interface ASN1Reader

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
AbstractASN1Reader

public interface ASN1Reader extends Closeable
An interface for decoding ASN.1 elements from a data source.

Methods for creating ASN1Readers are provided in the ASN1 class.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes this ASN.1 reader.
    boolean
    Indicates whether the next element can be read without blocking.
    boolean
    Indicates whether the current stream, sequence, or set contains another element.
    int
    Returns the data length of the next element without actually reading it.
    byte
    Returns the type of the next element without actually reading it.
    boolean
    Reads the next element as a boolean having the Universal Boolean ASN.1 type tag.
    boolean
    readBoolean(byte type)
    Reads the next element as a boolean having the provided type tag.
    void
    Finishes reading an explicit tag and discards any unread elements.
    void
    Finishes reading a sequence and discards any unread elements.
    void
    Finishes reading a set and discards any unread elements.
    int
    Reads the next element as an enumerated having the Universal Enumerated ASN.1 type tag.
    int
    readEnumerated(byte type)
    Reads the next element as an enumerated having the provided type tag.
    long
    Reads the next element as an integer having the Universal Integer ASN.1 type tag.
    long
    readInteger(byte type)
    Reads the next element as an integer having the provided type tag.
    void
    Reads the next element as a null element having the Universal Null ASN.1 type tag.
    void
    readNull(byte type)
    Reads the next element as a null element having the provided type tag.
    Reads the next element as an octet string having the Universal Octet String ASN.1 type tag.
    readOctetString(byte type)
    Reads the next element as an octet string having the provided type tag.
    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.
    Reads the next element as an octet string having the Universal Octet String ASN.1 type tag and appends it to the provided ByteStringBuilder.
    Reads the next element as an octet string having the Universal Octet String ASN.1 type tag and decodes the value as a UTF-8 encoded string.
    Reads the next element as an octet string having the provided type tag and decodes the value as a UTF-8 encoded string.
    void
    Reads the next element as an explicit ignoring the ASN.1 type tag.
    void
    Reads the next element as an explicit tag having the provided tag type.
    void
    Reads the next element as a sequence having the Universal Sequence ASN.1 type tag.
    void
    readStartSequence(byte type)
    Reads the next element as a sequence having the provided type tag.
    void
    Reads the next element as a set having the Universal Set ASN.1 type tag.
    void
    readStartSet(byte type)
    Reads the next element as a set having the provided type tag.
    Skips the next element without decoding it.
    skipElement(byte type)
    Skips the next element having the provided type tag without decoding it.