DERNode
Overview
DERNode is a class in Aspose.PDF FOSS for Java.
Represents a parsed ASN.1 DER (Distinguished Encoding Rules) node.
This class provides 22 methods for working with DERNode objects in Java programs.
Available methods include: getChild, getChildCount, getChildren, getEncodedSize, getInteger, getOID, getString, getTag, getValue, isBitString, isConstructed, isContextTag, and 9 additional methods.
All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package.
Properties: bitString, childCount, children, constructed, encodedSize, integer, and 8 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
tag | int | Read | Returns the tag byte. |
value | byte[] | Read | Returns the raw value bytes. |
children | List<DERNode> | Read | Returns child nodes (for constructed types). |
constructed | boolean | Read | Returns true if this is a constructed type. |
childCount | int | Read | Returns the number of children. |
sequence | boolean | Read | Gets the sequence. |
set | boolean | Read | Gets the set. |
octetString | boolean | Read | Gets the octet string. |
integer | BigInteger | Read | Extracts an INTEGER value. |
oID | String | Read | Decodes an OID to dotted string. |
bitString | boolean | Read | Gets the bit string. |
null | boolean | Read | Gets the null. |
string | String | Read | Extracts a string value (PrintableString, UTF8String, IA5String, etc.). |
encodedSize | int | Read | Returns the total DER-encoded size of this node. |
Methods
| Signature | Description |
|---|---|
parse(data: byte[]) → DERNode | Parses a DER-encoded byte array into a node tree. |
parse(data: byte[], offset: int, limit: int) → DERNode | Parses starting at offset, consuming up to limit. |
parseAll(data: byte[], offset: int, limit: int) → List<DERNode> | Parses all sequential nodes between offset and limit. |
getTag() → int | Returns the tag byte. |
getValue() → byte[] | Returns the raw value bytes. |
getChildren() → List<DERNode> | Returns child nodes (for constructed types). |
isConstructed() → boolean | Returns true if this is a constructed type. |
getChild(index: int) → DERNode | Returns the child at the given index. |
getChildCount() → int | Returns the number of children. |
isSequence() → boolean | Returns true if sequence is set. |
isSet() → boolean | Returns true if set is set. |
isOctetString() → boolean | Returns true if octet string is set. |
isInteger() → boolean | Returns true if integer is set. |
isOID() → boolean | Returns true if oid is set. |
isBitString() → boolean | Returns true if bit string is set. |
isNull() → boolean | Returns true if null is set. |
isContextTag(n: int) → boolean | |
getInteger() → BigInteger | Extracts an INTEGER value. |
getOID() → String | Decodes an OID to dotted string. |
getString() → String | Extracts a string value (PrintableString, UTF8String, IA5String, etc.). |
getEncodedSize() → int | Returns the total DER-encoded size of this node. |
toString() → String |