public class CMSCompressedDataParser extends CMSContentInfoParser
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.
Stream handling note:
getContent(InputExpanderProvider) and reading from the
returned CMSTypedStream.CMSContentInfoParser.close() on this parser (inherited from
CMSContentInfoParser) to close the underlying InputStream, or close
it yourself._contentInfo, _data| Constructor and Description |
|---|
CMSCompressedDataParser(byte[] compressedData) |
CMSCompressedDataParser(java.io.InputStream compressedData) |
| Modifier and Type | Method and Description |
|---|---|
CMSTypedStream |
getContent(InputExpanderProvider expanderProvider)
Return a typed stream which will allow the reading of the compressed content in
expanded form.
|
close, isBEREncodedpublic CMSCompressedDataParser(byte[] compressedData)
throws CMSException
CMSExceptionpublic CMSCompressedDataParser(java.io.InputStream compressedData)
throws CMSException
CMSExceptionpublic CMSTypedStream getContent(InputExpanderProvider expanderProvider) throws CMSException
expanderProvider - a provider of expander algorithm implementations.CMSException - if there is an exception parsing the CompressedData object.