public class DERWriter extends FilterOutputStream
out
Constructor and Description |
---|
DERWriter() |
DERWriter(int initialSize) |
DERWriter(OutputStream stream) |
Modifier and Type | Method and Description |
---|---|
DERWriter |
startSequence() |
byte[] |
toByteArray() |
void |
writeBigInteger(BigInteger value) |
void |
writeBigInteger(byte... bytes)
The integer is always considered to be positive, so if the first byte is < 0, we pad with a zero to make it
positive
|
void |
writeBigInteger(byte[] bytes,
int off,
int len)
The integer is always considered to be positive, so if the first byte is < 0, we pad with a zero to make it
positive
|
void |
writeLength(int len) |
void |
writeObject(ASN1Object obj) |
void |
writeObject(byte tag,
int len,
byte... data) |
public DERWriter()
public DERWriter(int initialSize)
public DERWriter(OutputStream stream)
public DERWriter startSequence()
public void writeBigInteger(BigInteger value) throws IOException
IOException
public void writeBigInteger(byte... bytes) throws IOException
bytes
- BigInteger
bytesIOException
- If failed to write the bytespublic void writeBigInteger(byte[] bytes, int off, int len) throws IOException
bytes
- BigInteger
bytesoff
- Offset in bytes datalen
- Number of bytes to writeIOException
- If failed to write the bytespublic void writeObject(ASN1Object obj) throws IOException
IOException
public void writeObject(byte tag, int len, byte... data) throws IOException
IOException
public void writeLength(int len) throws IOException
IOException
public byte[] toByteArray() throws IOException
IOException
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.