Package com.itextpdf.bouncycastle.asn1
Class ASN1PrimitiveBC
java.lang.Object
com.itextpdf.bouncycastle.asn1.ASN1EncodableBC
com.itextpdf.bouncycastle.asn1.ASN1PrimitiveBC
- All Implemented Interfaces:
-
IASN1Encodable
,IASN1Primitive
- Direct Known Subclasses:
-
ASN1BitStringBC
,ASN1EnumeratedBC
,ASN1GeneralizedTimeBC
,ASN1IntegerBC
,ASN1ObjectIdentifierBC
,ASN1OctetStringBC
,ASN1SequenceBC
,ASN1SetBC
,ASN1TaggedObjectBC
,ASN1UTCTimeBC
,DERIA5StringBC
,DERNullBC
,PKIFailureInfoBC
Wrapper class for
ASN1Primitive
.
-
Constructor Summary
ConstructorDescriptionASN1PrimitiveBC
(byte[] array) Creates new wrapper instance forASN1Primitive
.ASN1PrimitiveBC
(org.bouncycastle.asn1.ASN1Primitive primitive) Creates new wrapper instance forASN1Primitive
. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Calls actualgetEncoded
method for the wrapped ASN1Primitive object.byte[]
getEncoded
(String encoding) Calls actualgetEncoded
method for the wrapped ASN1Primitive object.org.bouncycastle.asn1.ASN1Primitive
Gets actual org.bouncycastle object being wrapped.Methods inherited from class com.itextpdf.bouncycastle.asn1.ASN1EncodableBC
equals, getEncodable, hashCode, isNull, toASN1Primitive, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.itextpdf.commons.bouncycastle.asn1.IASN1Encodable
isNull, toASN1Primitive
-
Constructor Details
-
ASN1PrimitiveBC
public ASN1PrimitiveBC(org.bouncycastle.asn1.ASN1Primitive primitive) Creates new wrapper instance forASN1Primitive
.- Parameters:
-
primitive
-ASN1Primitive
to be wrapped
-
ASN1PrimitiveBC
Creates new wrapper instance forASN1Primitive
.- Parameters:
-
array
- byte array to createASN1Primitive
to be wrapped - Throws:
-
IOException
- ifASN1Primitive
cannot be created from byte array.
-
-
Method Details
-
getPrimitive
public org.bouncycastle.asn1.ASN1Primitive getPrimitive()Gets actual org.bouncycastle object being wrapped.- Returns:
-
wrapped
ASN1Primitive
.
-
getEncoded
Calls actualgetEncoded
method for the wrapped ASN1Primitive object.- Specified by:
-
getEncoded
in interfaceIASN1Primitive
- Returns:
- the default encoding for the wrapped object.
- Throws:
-
IOException
- on encoding error.
-
getEncoded
Calls actualgetEncoded
method for the wrapped ASN1Primitive object.- Specified by:
-
getEncoded
in interfaceIASN1Primitive
- Parameters:
-
encoding
- encoding value - Returns:
- the default encoding for the wrapped object.
- Throws:
-
IOException
- on encoding error.
-