public class CMSCompressedData
extends java.lang.Object
implements org.bouncycastle.util.Encodable
CMSCompressedData cd = new CMSCompressedData(inputStream);
process(cd.getContent(new ZlibExpanderProvider()));
| Constructor and Description |
|---|
CMSCompressedData(byte[] compressedData)
Create a CMSCompressedData object from its encoding.
|
CMSCompressedData(org.bouncycastle.asn1.cms.ContentInfo contentInfo)
Create a CMSCompressedData object from an already-parsed ContentInfo.
|
CMSCompressedData(java.io.InputStream compressedData)
Create a CMSCompressedData object from a stream.
|
| Modifier and Type | Method and Description |
|---|---|
org.bouncycastle.asn1.ASN1ObjectIdentifier |
getCompressedContentType() |
byte[] |
getContent(InputExpanderProvider expanderProvider)
Return the uncompressed content.
|
CMSTypedStream |
getContentStream(InputExpanderProvider expanderProvider) |
org.bouncycastle.asn1.ASN1ObjectIdentifier |
getContentType() |
byte[] |
getEncoded()
return the ASN.1 encoded representation of this object.
|
org.bouncycastle.asn1.cms.ContentInfo |
toASN1Structure()
return the ContentInfo
|
public CMSCompressedData(byte[] compressedData)
throws CMSException
compressedData - the complete encoding of the CompressedData structure (a CMS ContentInfo).
The array must hold the entire encoding and nothing extra - trailing bytes
beyond the CompressedData are not permitted.CMSException - if the encoding cannot be parsed as a CompressedData.public CMSCompressedData(java.io.InputStream compressedData)
throws CMSException
compressedData - a stream positioned at the start of the CompressedData encoding (a CMS ContentInfo).CMSException - if the encoding cannot be parsed as a CompressedData.public CMSCompressedData(org.bouncycastle.asn1.cms.ContentInfo contentInfo)
throws CMSException
contentInfo - the ContentInfo carrying the CompressedData.CMSException - if the ContentInfo does not hold a well-formed CompressedData.public org.bouncycastle.asn1.ASN1ObjectIdentifier getContentType()
public org.bouncycastle.asn1.ASN1ObjectIdentifier getCompressedContentType()
public CMSTypedStream getContentStream(InputExpanderProvider expanderProvider) throws CMSException
CMSExceptionpublic byte[] getContent(InputExpanderProvider expanderProvider) throws CMSException
expanderProvider - a provider of expander algorithm implementations.CMSException - if there is an exception un-compressing the data.public org.bouncycastle.asn1.cms.ContentInfo toASN1Structure()
public byte[] getEncoded()
throws java.io.IOException
getEncoded in interface org.bouncycastle.util.Encodablejava.io.IOException