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
ConstructorsConstructorDescriptionASN1PrimitiveBC(byte[] array) Creates new wrapper instance forASN1Primitive.ASN1PrimitiveBC(org.bouncycastle.asn1.ASN1Primitive primitive) Creates new wrapper instance forASN1Primitive. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Calls actualgetEncodedmethod for the wrapped ASN1Primitive object.byte[]getEncoded(String encoding) Calls actualgetEncodedmethod for the wrapped ASN1Primitive object.org.bouncycastle.asn1.ASN1PrimitiveGets actual org.bouncycastle object being wrapped.Methods inherited from class com.itextpdf.bouncycastle.asn1.ASN1EncodableBC
equals, getEncodable, hashCode, isNull, toASN1Primitive, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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-ASN1Primitiveto be wrapped
-
ASN1PrimitiveBC
Creates new wrapper instance forASN1Primitive.- Parameters:
-
array- byte array to createASN1Primitiveto be wrapped - Throws:
-
IOException- ifASN1Primitivecannot 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 actualgetEncodedmethod for the wrapped ASN1Primitive object.- Specified by:
-
getEncodedin interfaceIASN1Primitive - Returns:
- the default encoding for the wrapped object.
- Throws:
-
IOException- on encoding error.
-
getEncoded
Calls actualgetEncodedmethod for the wrapped ASN1Primitive object.- Specified by:
-
getEncodedin interfaceIASN1Primitive - Parameters:
-
encoding- encoding value - Returns:
- the default encoding for the wrapped object.
- Throws:
-
IOException- on encoding error.
-