public class BCPGOutputStream extends java.io.OutputStream implements PacketTags, CompressionAlgorithmTags
COMPRESSED_DATA, EXPERIMENTAL_1, EXPERIMENTAL_2, EXPERIMENTAL_3, EXPERIMENTAL_4, LITERAL_DATA, MARKER, MOD_DETECTION_CODE, ONE_PASS_SIGNATURE, PUBLIC_KEY, PUBLIC_KEY_ENC_SESSION, PUBLIC_SUBKEY, RESERVED, SECRET_KEY, SECRET_SUBKEY, SIGNATURE, SYM_ENC_INTEGRITY_PRO, SYMMETRIC_KEY_ENC, SYMMETRIC_KEY_ENC_SESSION, TRUST, USER_ATTRIBUTE, USER_IDBZIP2, UNCOMPRESSED, ZIP, ZLIB| Constructor and Description |
|---|
BCPGOutputStream(java.io.OutputStream out) |
BCPGOutputStream(java.io.OutputStream out,
int tag)
Create a stream representing an old style partial object.
|
BCPGOutputStream(java.io.OutputStream out,
int tag,
byte[] buffer)
Create a new style partial input stream buffered into chunks.
|
BCPGOutputStream(java.io.OutputStream out,
int tag,
long length) |
BCPGOutputStream(java.io.OutputStream out,
int tag,
long length,
boolean oldFormat)
Create a stream representing a general packet.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
finish()
Finish writing out the current packet without closing the underlying stream.
|
void |
flush()
Flush the underlying stream.
|
void |
write(byte[] bytes,
int off,
int len) |
void |
write(int b) |
void |
writeObject(BCPGObject o) |
void |
writePacket(ContainedPacket p) |
public BCPGOutputStream(java.io.OutputStream out)
public BCPGOutputStream(java.io.OutputStream out,
int tag)
throws java.io.IOException
tag - the packet tag for the object.java.io.IOExceptionpublic BCPGOutputStream(java.io.OutputStream out,
int tag,
long length,
boolean oldFormat)
throws java.io.IOException
out - tag - length - oldFormat - java.io.IOExceptionpublic BCPGOutputStream(java.io.OutputStream out,
int tag,
long length)
throws java.io.IOException
tag - length - java.io.IOExceptionpublic BCPGOutputStream(java.io.OutputStream out,
int tag,
byte[] buffer)
throws java.io.IOException
out - output stream to write to.tag - packet tag.buffer - size of chunks making up the packet.java.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] bytes,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void writePacket(ContainedPacket p) throws java.io.IOException
java.io.IOExceptionpublic void writeObject(BCPGObject o) throws java.io.IOException
java.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void finish()
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOException