Class ASN1InputStreamBC

  • All Implemented Interfaces:
    IASN1InputStream, java.io.Closeable, java.lang.AutoCloseable

    public class ASN1InputStreamBC
    extends java.lang.Object
    implements IASN1InputStream
    Wrapper class for ASN1InputStream.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.bouncycastle.asn1.ASN1InputStream stream  
    • Constructor Summary

      Constructors 
      Constructor Description
      ASN1InputStreamBC​(byte[] bytes)
      Creates new wrapper instance for ASN1InputStream.
      ASN1InputStreamBC​(java.io.InputStream stream)
      Creates new wrapper instance for ASN1InputStream.
      ASN1InputStreamBC​(org.bouncycastle.asn1.ASN1InputStream asn1InputStream)
      Creates new wrapper instance for ASN1InputStream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Delegates close method call to the wrapped stream.
      boolean equals​(java.lang.Object o)
      Indicates whether some other object is "equal to" this one.
      org.bouncycastle.asn1.ASN1InputStream getASN1InputStream()
      Gets actual org.bouncycastle object being wrapped.
      int hashCode()
      Returns a hash code value based on the wrapped object.
      IASN1Primitive readObject()
      Calls actual readObject method for the wrapped ASN1InputStream object.
      java.lang.String toString()
      Delegates toString method call to the wrapped object.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • stream

        private final org.bouncycastle.asn1.ASN1InputStream stream
    • Constructor Detail

      • ASN1InputStreamBC

        public ASN1InputStreamBC​(org.bouncycastle.asn1.ASN1InputStream asn1InputStream)
        Creates new wrapper instance for ASN1InputStream.
        Parameters:
        asn1InputStream - ASN1InputStream to be wrapped
      • ASN1InputStreamBC

        public ASN1InputStreamBC​(byte[] bytes)
        Creates new wrapper instance for ASN1InputStream.
        Parameters:
        bytes - byte array to create ASN1InputStream
      • ASN1InputStreamBC

        public ASN1InputStreamBC​(java.io.InputStream stream)
        Creates new wrapper instance for ASN1InputStream.
        Parameters:
        stream - InputStream to create ASN1InputStream
    • Method Detail

      • getASN1InputStream

        public org.bouncycastle.asn1.ASN1InputStream getASN1InputStream()
        Gets actual org.bouncycastle object being wrapped.
        Returns:
        wrapped ASN1InputStream.
      • readObject

        public IASN1Primitive readObject()
                                  throws java.io.IOException
        Calls actual readObject method for the wrapped ASN1InputStream object.
        Specified by:
        readObject in interface IASN1InputStream
        Returns:
        IASN1Primitive wrapped ASN1Primitive object.
        Throws:
        java.io.IOException - if an I/O error occurs.
      • close

        public void close()
                   throws java.io.IOException
        Delegates close method call to the wrapped stream.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface IASN1InputStream
        Throws:
        java.io.IOException
      • equals

        public boolean equals​(java.lang.Object o)
        Indicates whether some other object is "equal to" this one. Compares wrapped objects.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Returns a hash code value based on the wrapped object.
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Delegates toString method call to the wrapped object.
        Overrides:
        toString in class java.lang.Object