public class CMSCompressedDataStreamGenerator
extends java.lang.Object
A simple example of usage.
CMSCompressedDataStreamGenerator gen = new CMSCompressedDataStreamGenerator(); OutputStream cOut = gen.open(outputStream, new ZlibCompressor()); cOut.write(data); cOut.close();
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ZLIB |
Constructor and Description |
---|
CMSCompressedDataStreamGenerator()
base constructor
|
Modifier and Type | Method and Description |
---|---|
java.io.OutputStream |
open(org.bouncycastle.asn1.ASN1ObjectIdentifier contentOID,
java.io.OutputStream out,
OutputCompressor compressor)
Open a compressing output stream.
|
java.io.OutputStream |
open(java.io.OutputStream out,
OutputCompressor compressor)
Open a compressing output stream with the PKCS#7 content type OID of "data".
|
void |
setBufferSize(int bufferSize)
Set the underlying string size for encapsulated data
|
public CMSCompressedDataStreamGenerator()
public void setBufferSize(int bufferSize)
bufferSize
- length of octet strings to buffer the data.public java.io.OutputStream open(java.io.OutputStream out, OutputCompressor compressor) throws java.io.IOException
out
- the stream to encode to.compressor
- the type of compressor to use.java.io.IOException
public java.io.OutputStream open(org.bouncycastle.asn1.ASN1ObjectIdentifier contentOID, java.io.OutputStream out, OutputCompressor compressor) throws java.io.IOException
contentOID
- the content type OID.out
- the stream to encode to.compressor
- the type of compressor to use.java.io.IOException