org.bouncycastle.cms
Class CMSCompressedDataParser
java.lang.Object
org.bouncycastle.cms.CMSContentInfoParser
org.bouncycastle.cms.CMSCompressedDataParser
- Direct Known Subclasses:
- SMIMECompressedParser
public class CMSCompressedDataParser
- extends CMSContentInfoParser
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.
Method Summary |
CMSTypedStream |
getContent()
Deprecated. use getContent(InputExpandedProvider) |
CMSTypedStream |
getContent(org.bouncycastle.operator.InputExpanderProvider expanderProvider)
Return a typed stream which will allow the reading of the compressed content in
expanded form. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CMSCompressedDataParser
public CMSCompressedDataParser(byte[] compressedData)
throws CMSException
- Throws:
CMSException
CMSCompressedDataParser
public CMSCompressedDataParser(java.io.InputStream compressedData)
throws CMSException
- Throws:
CMSException
getContent
public CMSTypedStream getContent()
throws CMSException
- Deprecated. use getContent(InputExpandedProvider)
- Throws:
CMSException
getContent
public CMSTypedStream getContent(org.bouncycastle.operator.InputExpanderProvider expanderProvider)
throws CMSException
- Return a typed stream which will allow the reading of the compressed content in
expanded form.
- Parameters:
expanderProvider
- a provider of expander algorithm implementations.
- Returns:
- a type stream which will yield the un-compressed content.
- Throws:
CMSException
- if there is an exception parsing the CompressedData object.