Class ASN1OutputStreamBC

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

    public class ASN1OutputStreamBC
    extends java.lang.Object
    implements IASN1OutputStream
    Wrapper class for ASN1OutputStream.
    • Field Summary

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

      Constructors 
      Constructor Description
      ASN1OutputStreamBC​(java.io.OutputStream stream)
      Creates new wrapper instance for ASN1OutputStream.
      ASN1OutputStreamBC​(org.bouncycastle.asn1.ASN1OutputStream stream)
      Creates new wrapper instance for ASN1OutputStream.
    • 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.ASN1OutputStream getASN1OutputStream()
      Gets actual org.bouncycastle object being wrapped.
      int hashCode()
      Returns a hash code value based on the wrapped object.
      java.lang.String toString()
      Delegates toString method call to the wrapped object.
      void writeObject​(IASN1Primitive primitive)
      Calls actual writeObject method for the wrapped ASN1OutputStream object.
      • Methods inherited from class java.lang.Object

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

      • stream

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

      • ASN1OutputStreamBC

        public ASN1OutputStreamBC​(java.io.OutputStream stream)
        Creates new wrapper instance for ASN1OutputStream.
        Parameters:
        stream - OutputStream to create ASN1OutputStream to be wrapped
      • ASN1OutputStreamBC

        public ASN1OutputStreamBC​(org.bouncycastle.asn1.ASN1OutputStream stream)
        Creates new wrapper instance for ASN1OutputStream.
        Parameters:
        stream - ASN1OutputStream to be wrapped
    • Method Detail

      • getASN1OutputStream

        public org.bouncycastle.asn1.ASN1OutputStream getASN1OutputStream()
        Gets actual org.bouncycastle object being wrapped.
        Returns:
        wrapped ASN1OutputStream.
      • writeObject

        public void writeObject​(IASN1Primitive primitive)
                         throws java.io.IOException
        Calls actual writeObject method for the wrapped ASN1OutputStream object.
        Specified by:
        writeObject in interface IASN1OutputStream
        Parameters:
        primitive - 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 IASN1OutputStream
        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