DERNode

Overview

DERNode is a class in Aspose.Pdf FOSS for Java.

Represents a parsed ASN.1 DER (Distinguished Encoding Rules) node.

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.
sequencebooleanRead
setbooleanRead
octetStringbooleanRead
integerBigIntegerReadExtracts an INTEGER value.
oIDStringReadDecodes an OID to dotted string.
bitStringbooleanRead
nullbooleanRead
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()boolean
isSet()boolean
isOctetString()boolean
isInteger()boolean
isOID()boolean
isBitString()boolean
isNull()boolean
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