Class ASN1
java.lang.Object
de.christofreichardt.asn1.ASN1
- All Implemented Interfaces:
de.christofreichardt.diagnosis.Traceable
- Direct Known Subclasses:
ASN1Integer, ASN1IntSequence
public abstract sealed class ASN1
extends Object
implements de.christofreichardt.diagnosis.Traceable
permits ASN1Integer, ASN1IntSequence
Abstract base class for the ASN.1 helper classes.
- Author:
- Christof Reichardt
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns a copy of the bytes representing the actual ASN.1 object without identifier and length octets.byte[]encoded()Returns a copy of the bytes representing the encoded ASN.1 object.de.christofreichardt.diagnosis.AbstractTracerbooleanIndicates if the underlying ASN.1 object is in short form (<= 127 octets).
-
Method Details
-
isShortForm
public boolean isShortForm()Indicates if the underlying ASN.1 object is in short form (<= 127 octets).- Returns:
- true if in short form.
-
encoded
public byte[] encoded()Returns a copy of the bytes representing the encoded ASN.1 object.- Returns:
- the encoded bytes. A new array will be allocated each time the method is called.
-
actualBytes
public byte[] actualBytes()Returns a copy of the bytes representing the actual ASN.1 object without identifier and length octets.- Returns:
- the content octets. A new array will be allocated each time the method is called.
-
getCurrentTracer
public de.christofreichardt.diagnosis.AbstractTracer getCurrentTracer()- Specified by:
getCurrentTracerin interfacede.christofreichardt.diagnosis.Traceable
-