@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ASN1ObjectIdentifier extends ASN1Element
Constructor and Description |
---|
ASN1ObjectIdentifier(byte type,
OID oid)
Creates a new ASN.1 object identifier element with the specified BER type
and the provided OID.
|
ASN1ObjectIdentifier(byte type,
java.lang.String oidString)
Creates a new ASN.1 object identifier element with the specified BER type
and the provided OID.
|
ASN1ObjectIdentifier(OID oid)
Creates a new ASN.1 object identifier element with the default BER type and
the provided OID.
|
ASN1ObjectIdentifier(java.lang.String oidString)
Creates a new ASN.1 object identifier element with the default BER type and
the provided OID.
|
Modifier and Type | Method and Description |
---|---|
static ASN1ObjectIdentifier |
decodeAsObjectIdentifier(ASN1Element element)
Decodes the provided ASN.1 element as an object identifier element.
|
static ASN1ObjectIdentifier |
decodeAsObjectIdentifier(byte[] elementBytes)
Decodes the contents of the provided byte array as an object identifier
element.
|
OID |
getOID()
Retrieves the OID represented by this object identifier element.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of the value for this ASN.1 element to the
provided buffer.
|
decode, decodeAsBigInteger, decodeAsBitString, decodeAsBoolean, decodeAsEnumerated, decodeAsGeneralizedTime, decodeAsIA5String, decodeAsInteger, decodeAsLong, decodeAsNull, decodeAsNumericString, decodeAsObjectIdentifier, decodeAsOctetString, decodeAsPrintableString, decodeAsSequence, decodeAsSet, decodeAsUTCTime, decodeAsUTF8String, encode, encodeLength, encodeTo, equals, equalsIgnoreType, getType, getTypeClass, getValue, getValueLength, hashCode, isConstructed, readFrom, readFrom, toString, writeTo
public ASN1ObjectIdentifier(@NotNull OID oid) throws ASN1Exception
oid
- The OID to represent with this element. It must not be
null
, and it must represent a valid OID.ASN1Exception
- If the provided OID does not strictly adhere to the
numeric OID format.public ASN1ObjectIdentifier(byte type, @NotNull OID oid) throws ASN1Exception
type
- The BER type for this element.oid
- The OID to represent with this element. It must not be
null
, and it must represent a valid OID.ASN1Exception
- If the provided OID does not strictly adhere to the
numeric OID format.public ASN1ObjectIdentifier(@NotNull java.lang.String oidString) throws ASN1Exception
oidString
- The string representation of the OID to represent with
this element. It must not be null
, and it must
represent a valid OID.ASN1Exception
- If the provided OID does not strictly adhere to the
numeric OID format.public ASN1ObjectIdentifier(byte type, @NotNull java.lang.String oidString) throws ASN1Exception
type
- The BER type for this element.oidString
- The string representation of the OID to represent with
this element. It must not be null
, and it must
represent a valid OID.ASN1Exception
- If the provided OID does not strictly adhere to the
numeric OID format.@NotNull public OID getOID()
@NotNull public static ASN1ObjectIdentifier decodeAsObjectIdentifier(@NotNull byte[] elementBytes) throws ASN1Exception
elementBytes
- The byte array to decode as an ASN.1 object
identifier element.ASN1Exception
- If the provided array cannot be decoded as an
object identifier element.@NotNull public static ASN1ObjectIdentifier decodeAsObjectIdentifier(@NotNull ASN1Element element) throws ASN1Exception
element
- The ASN.1 element to be decoded.ASN1Exception
- If the provided element cannot be decoded as an
object identifier element.public void toString(@NotNull java.lang.StringBuilder buffer)
toString
in class ASN1Element
buffer
- The buffer to which to append the information.