Class ASN1Writer

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void writeElement​(ASN1Element element, java.io.OutputStream outputStream)
      Writes an encoded representation of the provided ASN.1 element to the given output stream.
      static void writeElement​(ASN1Element element, java.nio.ByteBuffer buffer)
      Appends an encoded representation of the provided ASN.1 element to the given byte buffer.
      • Methods inherited from class java.lang.Object

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

      • writeElement

        public static void writeElement​(ASN1Element element,
                                        java.io.OutputStream outputStream)
                                 throws java.io.IOException
        Writes an encoded representation of the provided ASN.1 element to the given output stream.
        Parameters:
        element - The ASN.1 element to be written.
        outputStream - The output stream to which the encoded representation of the element should be written.
        Throws:
        java.io.IOException - If a problem occurs while writing the element.
      • writeElement

        public static void writeElement​(ASN1Element element,
                                        java.nio.ByteBuffer buffer)
                                 throws java.nio.BufferOverflowException
        Appends an encoded representation of the provided ASN.1 element to the given byte buffer. When this method completes, the position will be at the beginning of the written element, and the limit will be at the end.
        Parameters:
        element - The ASN.1 element to be written.
        buffer - The buffer to which the element should be added.
        Throws:
        java.nio.BufferOverflowException - If the provided buffer does not have enough space between the position and the limit to hold the encoded element.