@ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ASN1Writer extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
writeElement(ASN1Element element,
java.nio.ByteBuffer buffer)
Appends an encoded representation of the provided ASN.1 element to the
given byte buffer.
|
static void |
writeElement(ASN1Element element,
java.io.OutputStream outputStream)
Writes an encoded representation of the provided ASN.1 element to the
given output stream.
|
public static void writeElement(@NotNull ASN1Element element, @NotNull java.io.OutputStream outputStream) throws java.io.IOException
element
- The ASN.1 element to be written.outputStream
- The output stream to which the encoded representation
of the element should be written.java.io.IOException
- If a problem occurs while writing the element.public static void writeElement(@NotNull ASN1Element element, @NotNull java.nio.ByteBuffer buffer) throws java.nio.BufferOverflowException
element
- The ASN.1 element to be written.buffer
- The buffer to which the element should be added.java.nio.BufferOverflowException
- If the provided buffer does not have
enough space between the position and
the limit to hold the encoded element.