Bouncy Castle Cryptography Library 1.45

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


Constructor Summary
CMSCompressedData(byte[] compressedData)
           
CMSCompressedData(org.bouncycastle.asn1.cms.ContentInfo contentInfo)
           
CMSCompressedData(java.io.InputStream compressedData)
           
 
Method Summary
 byte[] getContent()
          Return the uncompressed content.
 byte[] getContent(int limit)
          Return the uncompressed content, throwing an exception if the data size is greater than the passed in limit.
 org.bouncycastle.asn1.cms.ContentInfo getContentInfo()
          return the ContentInfo
 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
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
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.

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.45