|
Bouncy Castle Cryptography Library 1.45 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.openpgp.PGPCompressedDataGenerator
public class PGPCompressedDataGenerator
class for producing compressed data packets.
Field Summary |
---|
Fields inherited from interface org.bouncycastle.bcpg.CompressionAlgorithmTags |
---|
BZIP2, UNCOMPRESSED, ZIP, ZLIB |
Constructor Summary | |
---|---|
PGPCompressedDataGenerator(int algorithm)
|
|
PGPCompressedDataGenerator(int algorithm,
int compression)
|
Method Summary | |
---|---|
void |
close()
Close the compressed object - this is equivalent to calling close on the stream returned by the open() method. |
java.io.OutputStream |
open(java.io.OutputStream out)
Return an outputstream which will save the data being written to the compressed object. |
java.io.OutputStream |
open(java.io.OutputStream out,
byte[] buffer)
Return an outputstream which will compress the data as it is written to it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PGPCompressedDataGenerator(int algorithm)
public PGPCompressedDataGenerator(int algorithm, int compression)
Method Detail |
---|
public java.io.OutputStream open(java.io.OutputStream out) throws java.io.IOException
The stream created can be closed off by either calling close() on the stream or close() on the generator. Closing the returned stream does not close off the OutputStream parameter out.
out
- underlying OutputStream to be used.
IOException,
- IllegalStateException
java.io.IOException
public java.io.OutputStream open(java.io.OutputStream out, byte[] buffer) throws java.io.IOException, PGPException
The stream created can be closed off by either calling close() on the stream or close() on the generator. Closing the returned stream does not close off the OutputStream parameter out.
Note: if the buffer is not a power of 2 in length only the largest power of 2 bytes worth of the buffer will be used.
Note: using this may break compatability with RFC 1991 compliant tools. Only recent OpenPGP implementations are capable of accepting these streams.
out
- underlying OutputStream to be used.buffer
- the buffer to use.
java.io.IOException
PGPException
public void close() throws java.io.IOException
java.io.IOException
|
Bouncy Castle Cryptography Library 1.45 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |