Class ASN1OutputStream

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

    public class ASN1OutputStream
    extends java.io.FilterOutputStream
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private ASN1Encoder encoder  
      • Fields inherited from class java.io.FilterOutputStream

        out
    • Constructor Summary

      Constructors 
      Constructor Description
      ASN1OutputStream​(ASN1Encoder encoder, java.io.OutputStream out)
      Creates an output stream filter built on top of the specified underlying output stream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private int lengthBytes​(int length)  
      void write​(byte[] b, int off, int len)  
      private void writeLength​(int length)  
      void writeObject​(ASN1Object asn1Object)  
      private void writeTag​(ASN1Tag tag)  
      • Methods inherited from class java.io.FilterOutputStream

        close, flush, write, write
      • Methods inherited from class java.io.OutputStream

        nullOutputStream
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ASN1OutputStream

        public ASN1OutputStream​(ASN1Encoder encoder,
                                java.io.OutputStream out)
        Creates an output stream filter built on top of the specified underlying output stream.
        Parameters:
        out - the underlying output stream to be assigned to the field this.out for later use, or null if this instance is to be created without an underlying stream.
    • Method Detail

      • writeObject

        public void writeObject​(ASN1Object asn1Object)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • writeLength

        private void writeLength​(int length)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • lengthBytes

        private int lengthBytes​(int length)
      • writeTag

        private void writeTag​(ASN1Tag tag)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public void write​(byte[] b,
                          int off,
                          int len)
                   throws java.io.IOException
        Overrides:
        write in class java.io.FilterOutputStream
        Throws:
        java.io.IOException