Package com.hierynomus.asn1
Class ASN1OutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- com.hierynomus.asn1.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
-
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)
-
-
-
Field Detail
-
encoder
private final ASN1Encoder encoder
-
-
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, ornull
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 classjava.io.FilterOutputStream
- Throws:
java.io.IOException
-
-