Top Description Fields Constructors Methods
org.bouncycastle.asn1

public Class DERTaggedObject

extends ASN1TaggedObject
Class Inheritance
Imports
java.io.IOException

DER TaggedObject - in ASN.1 notation this is any object preceded by a [n] where n is some number - these are assumed to follow the construction rules (as with sequences).

Field Summary

Modifier and TypeField and Description
private static final byte[]
Inherited from org.bouncycastle.asn1.ASN1TaggedObject:
emptyexplicitobjtagNo

Constructor Summary

AccessConstructor and Description
public
DERTaggedObject(boolean
true if an explicitly tagged object.
explicit
,
int
the tag number for this object.
tagNo
,
ASN1Encodable
the tagged object.
obj
)

public
DERTaggedObject(int tagNo, ASN1Encodable encodable)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv int
encodedLength()

Implements abstract org.bouncycastle.asn1.ASN1Primitive.encodedLength.

Return the length of the encoding this object will produce.
pack-priv boolean
isConstructed()

Implements abstract org.bouncycastle.asn1.ASN1Primitive.isConstructed.

Return true if this objected is a CONSTRUCTED one, false otherwise.
Inherited from org.bouncycastle.asn1.ASN1TaggedObject:
asn1EqualsgetInstancegetInstancegetLoadedObjectgetObjectgetObjectParsergetTagNohashCodeisEmptyisExplicittoDERObjecttoDLObjecttoString

Field Detail

ZERO_BYTESback to summary
private static final byte[] ZERO_BYTES

Constructor Detail

DERTaggedObjectback to summary
public DERTaggedObject(boolean explicit, int tagNo, ASN1Encodable obj)
Parameters
explicit:boolean

true if an explicitly tagged object.

tagNo:int

the tag number for this object.

obj:ASN1Encodable

the tagged object.

DERTaggedObjectback to summary
public DERTaggedObject(int tagNo, ASN1Encodable encodable)

Method Detail

encodeback to summary
pack-priv void encode(ASN1OutputStream out) throws IOException

Implements abstract org.bouncycastle.asn1.ASN1TaggedObject.encode.

encodedLengthback to summary
pack-priv int encodedLength() throws IOException

Implements abstract org.bouncycastle.asn1.ASN1Primitive.encodedLength.

Doc from org.bouncycastle.asn1.ASN1Primitive.encodedLength.

Return the length of the encoding this object will produce.

Returns:int

the length of the object's encoding.

Exceptions
IOException:
if the encoding length cannot be calculated.
isConstructedback to summary
pack-priv boolean isConstructed()

Implements abstract org.bouncycastle.asn1.ASN1Primitive.isConstructed.

Doc from org.bouncycastle.asn1.ASN1Primitive.isConstructed.

Return true if this objected is a CONSTRUCTED one, false otherwise.

Returns:boolean

true if CONSTRUCTED bit set on object's tag, false otherwise.