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

NameTypeAccessDescription
tagintReadReturns the tag byte.
valuebyte[]ReadReturns the raw value bytes.
childrenList<DERNode>ReadReturns child nodes (for constructed types).
constructedbooleanReadReturns true if this is a constructed type.
childCountintReadReturns the number of children.
sequencebooleanReadGets the sequence.
setbooleanReadGets the set.
octetStringbooleanReadGets the octet string.
integerBigIntegerReadExtracts an INTEGER value.
oIDStringReadDecodes an OID to dotted string.
bitStringbooleanReadGets the bit string.
nullbooleanReadGets the null.
stringStringReadExtracts a string value (PrintableString, UTF8String, IA5String, etc.).
encodedSizeintReadReturns the total DER-encoded size of this node.

Methods

SignatureDescription
parse(data: byte[])DERNodeParses a DER-encoded byte array into a node tree.
parse(data: byte[], offset: int, limit: int)DERNodeParses 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()intReturns the tag byte.
getValue()byte[]Returns the raw value bytes.
getChildren()List<DERNode>Returns child nodes (for constructed types).
isConstructed()booleanReturns true if this is a constructed type.
getChild(index: int)DERNodeReturns the child at the given index.
getChildCount()intReturns the number of children.
isSequence()booleanReturns true if sequence is set.
isSet()booleanReturns true if set is set.
isOctetString()booleanReturns true if octet string is set.
isInteger()booleanReturns true if integer is set.
isOID()booleanReturns true if oid is set.
isBitString()booleanReturns true if bit string is set.
isNull()booleanReturns true if null is set.
isContextTag(n: int)boolean
getInteger()BigIntegerExtracts an INTEGER value.
getOID()StringDecodes an OID to dotted string.
getString()StringExtracts a string value (PrintableString, UTF8String, IA5String, etc.).
getEncodedSize()intReturns the total DER-encoded size of this node.
toString()String

See Also

 English