Skip navigation links

Oracle Security Developer Tools CMS Java API Reference
11g (11.1.1)

E10667-02


oracle.security.crypto.cms
Class CMSCompressedDataContentInfo

java.lang.Object
  extended by oracle.security.crypto.cms.CMSContentInfo
      extended by oracle.security.crypto.cms.CMSCompressedDataContentInfo

All Implemented Interfaces:
oracle.security.crypto.asn1.ASN1Object, oracle.security.crypto.util.Streamable

public class CMSCompressedDataContentInfo
extends CMSContentInfo

This class encapsulates a CMS object of content type digested-data.


Constructor Summary
CMSCompressedDataContentInfo()
          Creates an empty CMSCompressed DataContentInfo.
CMSCompressedDataContentInfo(CMSContentInfo contentInfo, oracle.security.crypto.core.AlgorithmIdentifier compressionAlgID)
          Creates a CMSCompressed DataContentInfo object by compressing the given CMS object.
CMSCompressedDataContentInfo(java.io.InputStream is)
          Creates a CMSCompressed DataContentInfo object, by reading a BER encoding from the specified input stream.

 

Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 oracle.security.crypto.core.AlgorithmIdentifier getCompressionAlgID()
          Returns the compression algorithm.
 CMSContentInfo getEnclosed()
          Returns the digested content.
 oracle.security.crypto.asn1.ASN1ObjectID getEnclosedContentType()
          Returns the content type of the digested content.
protected  byte[] getExposedContent()
          Returns the contents octets of the DER encoding of the content field of this CMS object.
 oracle.security.crypto.asn1.ASN1Integer getVersion()
          Deprecated. As of Phaos CMS 2.0.1, replaced by getVersionNumber()
 java.math.BigInteger getVersionNumber()
          Returns the version number.
 int hashCode()
          Returns a hash code value for this object.
protected  void inputContent(java.io.InputStream is)
          Initializes this object by reading the Content field of the CMS ContentInfo structure i.e.
 boolean isDetached()
          Indicates if this CMS object is detached.
 void setEnclosed(CMSContentInfo content)
          Set the encapsulated content i.e.
protected  void setExposedContent(byte[] expContent)
          Returns the contents octets of the DER encoding of the content field of this CMS object.
 java.lang.String toString()
          Returns a brief text description of this object.
protected  void update()
          Clears the internal output cache.
 void writeDetached(boolean writeDetached)
          Indicate if the CMS Object that is being digested should be omitted when creating the CMSCompressed DataContentInfo object.

 

Methods inherited from class oracle.security.crypto.cms.CMSContentInfo
computeDigest, contentTypeName, getContentType, input, inputInstance, isDegenerate, length, output

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Constructor Detail

CMSCompressedDataContentInfo

public CMSCompressedDataContentInfo()
Creates an empty CMSCompressed DataContentInfo.

CMSCompressedDataContentInfo

public CMSCompressedDataContentInfo(CMSContentInfo contentInfo,
                                    oracle.security.crypto.core.AlgorithmIdentifier compressionAlgID)
                             throws oracle.security.crypto.core.AlgorithmIdentifierException
Creates a CMSCompressed DataContentInfo object by compressing the given CMS object.
Parameters:
contentInfo - The CMS Object that is to be compressed.
compressionAlgID - The digest algorithm.
Throws:
oracle.security.crypto.core.AlgorithmIdentifierException - The compression algorithm is not supported.

CMSCompressedDataContentInfo

public CMSCompressedDataContentInfo(java.io.InputStream is)
                             throws java.io.IOException
Creates a CMSCompressed DataContentInfo object, by reading a BER encoding from the specified input stream.
Parameters:
is - The input stream.
Throws:
java.io.IOException - If the input is not correctly formatted, has the wrong content type; or an I/O exception occurs.

Method Detail

setExposedContent

protected void setExposedContent(byte[] expContent)
Description copied from class: CMSContentInfo
Returns the contents octets of the DER encoding of the content field of this CMS object. The value returned is suitable for input to the "message-digesting" and "content-encryption" process of RFC-2630.
Specified by:
setExposedContent in class CMSContentInfo
See Also:
CMSContentInfo.isDetached()

getExposedContent

protected byte[] getExposedContent()
Description copied from class: CMSContentInfo
Returns the contents octets of the DER encoding of the content field of this CMS object. The value returned is suitable for input to the "message-digesting" and "content-encryption" process of RFC-2630.
Specified by:
getExposedContent in class CMSContentInfo
Returns:
The contents octets or null for a detached CMS object.
See Also:
CMSContentInfo.isDetached()

writeDetached

public void writeDetached(boolean writeDetached)
Indicate if the CMS Object that is being digested should be omitted when creating the CMSCompressed DataContentInfo object.

The default (true) is to ensure the CMS Object that is being digested is a part of the CMSCompressed DataContentInfo object.

Parameters:
writeDetached - true ensures the CMS Object being digested is not a part of the CMSCompressed DataContentInfo object; false ensures that the CMS Object being digested is a part of the CMSCompressed DataContentInfo object;

setEnclosed

public void setEnclosed(CMSContentInfo content)
Set the encapsulated content i.e. the CMS Object that was originally digested.

This method must be called before trying to the verify the digest of a detached CMSCompressed DataContentInfo Object.

Parameters:
content - The CMS Object.
See Also:
isDetached()

getEnclosed

public CMSContentInfo getEnclosed()
Returns the digested content.
Returns:
The CMS Object.

getEnclosedContentType

public oracle.security.crypto.asn1.ASN1ObjectID getEnclosedContentType()
Returns the content type of the digested content.
Returns:
The content type identifier.

getCompressionAlgID

public oracle.security.crypto.core.AlgorithmIdentifier getCompressionAlgID()
Returns the compression algorithm.
Returns:
The compression algorithm identifier.

getVersionNumber

public java.math.BigInteger getVersionNumber()
Returns the version number.
Returns:
The version number.

getVersion

public oracle.security.crypto.asn1.ASN1Integer getVersion()
Deprecated. As of Phaos CMS 2.0.1, replaced by getVersionNumber()
Returns the version number.
Returns:
The version number.

isDetached

public boolean isDetached()
Indicates if this CMS object is detached.
Specified by:
isDetached in class CMSContentInfo
Returns:
true if detached; false otherwise.
See Also:
CMSContentInfo.isDetached()

toString

public java.lang.String toString()
Returns a brief text description of this object.
Overrides:
toString in class java.lang.Object
Returns:
A string description this object.

hashCode

public int hashCode()
Returns a hash code value for this object.
Overrides:
hashCode in class java.lang.Object
Returns:
The hash code value.

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
Overrides:
equals in class java.lang.Object
Returns:
true if this object is the same as the obj argument; false otherwise.

inputContent

protected void inputContent(java.io.InputStream is)
                     throws java.io.IOException
Description copied from class: CMSContentInfo
Initializes this object by reading the Content field of the CMS ContentInfo structure i.e. the input stream must be positioned at the value octets of the Content field i.e. after the explicit [0] tag.

This method must be implemented by subclasses. It is unlikely that package users will ever need to call it directly.

Specified by:
inputContent in class CMSContentInfo
Throws:
java.io.IOException

update

protected void update()
Clears the internal output cache. This method is called automatically if the object ever changes, so API users need not be concerned with it. Implementors of subclasses, however, do need to ensure that it gets called when appropriate.
Overrides:
update in class CMSContentInfo

Skip navigation links

Oracle Security Developer Tools CMS Java API Reference
11g (11.1.1)

E10667-02


Copyright © 2005, 2009, Oracle. All rights reserved.