public class CMSCompressedDataStreamGenerator extends Object
A simple example of usage.
CMSCompressedDataStreamGenerator gen = new CMSCompressedDataStreamGenerator(); OutputStream cOut = gen.open(outputStream, new ZlibCompressor()); cOut.write(data); cOut.close();
Constructor and Description |
---|
CMSCompressedDataStreamGenerator()
base constructor
|
Modifier and Type | Method and Description |
---|---|
OutputStream |
open(ASN1ObjectIdentifier contentOID,
OutputStream out,
OutputCompressor compressor)
Open a compressing output stream.
|
OutputStream |
open(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 static final String ZLIB
public CMSCompressedDataStreamGenerator()
public void setBufferSize(int bufferSize)
bufferSize
- length of octet strings to buffer the data.public OutputStream open(OutputStream out, OutputCompressor compressor) throws IOException
out
- the stream to encode to.compressor
- the type of compressor to use.IOException
public OutputStream open(ASN1ObjectIdentifier contentOID, OutputStream out, OutputCompressor compressor) throws IOException
contentOID
- the content type OID.out
- the stream to encode to.compressor
- the type of compressor to use.IOException
Copyright © 2021 BouncyCastle.org. All rights reserved.