Bouncy Castle Cryptography Library 1.46

org.bouncycastle.cms
Class CMSCompressedData

java.lang.Object
  extended by org.bouncycastle.cms.CMSCompressedData
Direct Known Subclasses:
SMIMECompressed

public class CMSCompressedData
extends java.lang.Object

containing class for an CMS Compressed Data object

     CMSCompressedData cd = new CMSCompressedData(inputStream);

     process(cd.getContent(new ZlibExpanderProvider()));
 


Constructor Summary
CMSCompressedData(byte[] compressedData)
           
CMSCompressedData(org.bouncycastle.asn1.cms.ContentInfo contentInfo)
           
CMSCompressedData(java.io.InputStream compressedData)
           
 
Method Summary
 byte[] getContent()
          Deprecated. use getContent(InputExpanderProvider)
 byte[] getContent(InputExpanderProvider expanderProvider)
          Return the uncompressed content.
 byte[] getContent(int limit)
          Deprecated. use getContent(InputExpanderProvider)
 org.bouncycastle.asn1.cms.ContentInfo getContentInfo()
          return the ContentInfo
 org.bouncycastle.asn1.ASN1ObjectIdentifier getContentType()
           
 byte[] getEncoded()
          return the ASN.1 encoded representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMSCompressedData

public CMSCompressedData(byte[] compressedData)
                  throws CMSException
Throws:
CMSException

CMSCompressedData

public CMSCompressedData(java.io.InputStream compressedData)
                  throws CMSException
Throws:
CMSException

CMSCompressedData

public CMSCompressedData(org.bouncycastle.asn1.cms.ContentInfo contentInfo)
                  throws CMSException
Throws:
CMSException
Method Detail

getContent

public byte[] getContent()
                  throws CMSException
Deprecated. use getContent(InputExpanderProvider)

Return the uncompressed content.

Returns:
the uncompressed content
Throws:
CMSException - if there is an exception uncompressing the data.

getContent

public byte[] getContent(int limit)
                  throws CMSException
Deprecated. use getContent(InputExpanderProvider)

Return the uncompressed content, throwing an exception if the data size is greater than the passed in limit. If the content is exceeded getCause() on the CMSException will contain a StreamOverflowException

Parameters:
limit - maximum number of bytes to read
Returns:
the content read
Throws:
CMSException - if there is an exception uncompressing the data.

getContentType

public org.bouncycastle.asn1.ASN1ObjectIdentifier getContentType()

getContent

public byte[] getContent(InputExpanderProvider expanderProvider)
                  throws CMSException
Return the uncompressed content.

Parameters:
expanderProvider - a provider of expander algorithm implementations.
Returns:
the uncompressed content
Throws:
CMSException - if there is an exception un-compressing the data.

getContentInfo

public org.bouncycastle.asn1.cms.ContentInfo getContentInfo()
return the ContentInfo


getEncoded

public byte[] getEncoded()
                  throws java.io.IOException
return the ASN.1 encoded representation of this object.

Throws:
java.io.IOException

Bouncy Castle Cryptography Library 1.46