Class ASN1Object

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class ASN1Object
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Cloneable
    See Also:
    Serialized Form
    • Field Detail

      • constructed

        private boolean constructed
      • length

        private int length
      • value

        private byte[] value
    • Constructor Detail

      • ASN1Object

        public ASN1Object()
      • ASN1Object

        public ASN1Object​(byte tag,
                          int len,
                          byte... data)
      • ASN1Object

        public ASN1Object​(ASN1Class c,
                          ASN1Type t,
                          boolean ctored,
                          int len,
                          byte... data)
    • Method Detail

      • getObjClass

        public ASN1Class getObjClass()
      • setObjClass

        public void setObjClass​(ASN1Class c)
      • getObjType

        public ASN1Type getObjType()
      • setObjType

        public void setObjType​(ASN1Type y)
      • isConstructed

        public boolean isConstructed()
      • setConstructed

        public void setConstructed​(boolean c)
      • getLength

        public int getLength()
      • setLength

        public void setLength​(int l)
      • getValue

        public byte[] getValue()
      • getPureValueBytes

        public byte[] getPureValueBytes()
      • setValue

        public void setValue​(byte[] v)
      • createParser

        public DERParser createParser()
      • asObject

        public java.lang.Object asObject()
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • asInteger

        public java.math.BigInteger asInteger()
                                       throws java.io.IOException
        Get the value as BigInteger
        Returns:
        BigInteger
        Throws:
        java.io.IOException - if type not an ASN1Type.INTEGER
      • toInteger

        public java.math.BigInteger toInteger()
      • asString

        public java.lang.String asString()
                                  throws java.io.IOException
        Get value as string. Most strings are treated as Latin-1.
        Returns:
        Java string
        Throws:
        java.io.IOException - if
      • asOID

        public java.util.List<java.lang.Integer> asOID()
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • toOID

        public java.util.List<java.lang.Integer> toOID()
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • clone

        public ASN1Object clone()
        Overrides:
        clone in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object