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

public class ASN1PrimitiveBC extends ASN1EncodableBC implements IASN1Primitive
Wrapper class for ASN1Primitive.
  • Constructor Details

    • ASN1PrimitiveBC

      public ASN1PrimitiveBC (org.bouncycastle.asn1.ASN1Primitive primitive)
      Creates new wrapper instance for ASN1Primitive.
      Parameters:
      primitive - ASN1Primitive to be wrapped
    • ASN1PrimitiveBC

      public ASN1PrimitiveBC (byte[] array) throws IOException
      Creates new wrapper instance for ASN1Primitive.
      Parameters:
      array - byte array to create ASN1Primitive to be wrapped
      Throws:
      IOException - if ASN1Primitive 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

      public byte[] getEncoded() throws IOException
      Calls actual getEncoded method for the wrapped ASN1Primitive object.
      Specified by:
      getEncoded in interface IASN1Primitive
      Returns:
      the default encoding for the wrapped object.
      Throws:
      IOException - on encoding error.
    • getEncoded

      public byte[] getEncoded (String encoding) throws IOException
      Calls actual getEncoded method for the wrapped ASN1Primitive object.
      Specified by:
      getEncoded in interface IASN1Primitive
      Parameters:
      encoding - encoding value
      Returns:
      the default encoding for the wrapped object.
      Throws:
      IOException - on encoding error.