Top Description Fields Constructors Methods
org.bouncycastle.cms

public Class CMSCompressedDataParser

extends CMSContentInfoParser
Class Inheritance
Imports
java.io.ByteArrayInputStream, .IOException, .InputStream, org.bouncycastle.asn1.ASN1OctetStringParser, .ASN1SequenceParser, .BERTags, org.bouncycastle.asn1.cms.CompressedDataParser, .ContentInfoParser, org.bouncycastle.operator.InputExpander, .InputExpanderProvider

Class for reading a CMS Compressed Data stream.
    CMSCompressedDataParser cp = new CMSCompressedDataParser(inputStream);

    process(cp.getContent(new ZlibExpanderProvider()).getContentStream());
Note: this class does not introduce buffering - if you are processing large files you should create the parser with:
     CMSCompressedDataParser     ep = new CMSCompressedDataParser(new BufferedInputStream(inputStream, bufSize));
 
where bufSize is a suitably large buffer size.

Field Summary

Inherited from org.bouncycastle.cms.CMSContentInfoParser:
_contentInfo_data

Constructor Summary

AccessConstructor and Description
public
CMSCompressedDataParser(byte[] compressedData)

public

Method Summary

Modifier and TypeMethod and Description
public CMSTypedStream

Returns:

a type stream which will yield the un-compressed content.
getContent
(InputExpanderProvider
a provider of expander algorithm implementations.
expanderProvider
)

Return a typed stream which will allow the reading of the compressed content in expanded form.

Inherited from org.bouncycastle.cms.CMSContentInfoParser:
close

Constructor Detail

CMSCompressedDataParserback to summary
public CMSCompressedDataParser(byte[] compressedData) throws CMSException
CMSCompressedDataParserback to summary
public CMSCompressedDataParser(InputStream compressedData) throws CMSException

Method Detail

getContentback to summary
public CMSTypedStream getContent(InputExpanderProvider expanderProvider) throws CMSException

Return a typed stream which will allow the reading of the compressed content in expanded form.

Parameters
expanderProvider:InputExpanderProvider

a provider of expander algorithm implementations.

Returns:CMSTypedStream

a type stream which will yield the un-compressed content.

Exceptions
CMSException:
if there is an exception parsing the CompressedData object.