|
Oracle Fusion Middleware CMS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10667-05 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
oracle.security.crypto.cms.CMSContentInfo
public abstract class CMSContentInfo
The base class for all CMS objects.
A CMS object consists of a content type, and content.
Subclasses must override the getExposedContent and inputContent methods.
| Constructor Summary | |
|---|---|
protected |
CMSContentInfo(oracle.security.crypto.asn1.ASN1ObjectID contentType)Creates a CMSContentInfo object with the specified content type. |
| Method Summary | |
|---|---|
byte[] |
computeDigest(java.security.MessageDigest md)Computes the Message Digest of the exposed content. |
static java.lang.String |
contentTypeName(oracle.security.crypto.asn1.ASN1ObjectID contentType)Returns the content type of the CMS Object. |
oracle.security.crypto.asn1.ASN1ObjectID |
getContentType()Returns the content type of the CMS object. |
protected abstract byte[] |
getExposedContent()Returns the contents octets of the DER encoding of the content field of this CMS object. |
void |
input(java.io.InputStream is)Initialize this CMS Object by reading a BER encoding from the specified input stream. |
protected abstract void |
inputContent(java.io.InputStream is)Initializes this object by reading the Content field of the CMS ContentInfo structure i.e. |
static CMSContentInfo |
inputInstance(java.io.InputStream is)Creates a CMSContentInfo object by reading a BER encoding from the given input stream. |
boolean |
isDegenerate()Returns false, except as noted below. |
abstract boolean |
isDetached()This method must be implemented by the subclasses. |
int |
length()Returns the length of this object's encoding. |
void |
output(java.io.OutputStream os)Outputs this object to the specified output stream. |
protected abstract void |
setExposedContent(byte[] expContent)Returns the contents octets of the DER encoding of the content field of this CMS object. |
protected void |
update()Clears the internal output cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected CMSContentInfo(oracle.security.crypto.asn1.ASN1ObjectID contentType)
CMSContentInfo object with the specified content type.
contentType - The content type of the object.CMS| Method Detail |
|---|
public static CMSContentInfo inputInstance(java.io.InputStream is)
throws java.io.IOException
CMSContentInfo object by reading a BER encoding from the given input stream.
This method is typically used to read nested CMS Objects instead of using the CMSInputStream classes.
is - The input stream containing an encoded CMS Object.java.io.IOException - If an I/O error occurred or the CMS object encoding was incorrect or the CMS object content type is not supported.CMSInputStreampublic oracle.security.crypto.asn1.ASN1ObjectID getContentType()
CMSprotected abstract byte[] getExposedContent()
null for a detached CMS object.isDetached()public static java.lang.String contentTypeName(oracle.security.crypto.asn1.ASN1ObjectID contentType)
public boolean isDegenerate()
false, except as noted below.
CMS (RFC-2630) defines a degenerate case only for the CMSSignedDataContentInfo i.e. signed-data, so this method is overridden to return true when appropriate.
public abstract boolean isDetached()
A detached object is defined as one in which the protected content is not present.
In the case of CMSDigestedDataContentInfo, CMSSignedDataContentInfo and CMSAuthenticatedDataContentInfo the econtent is missing in the EncapsulatedContentInfo structure. In the case of CMSEncryptedDataContentInfo and CMSEnvelopedDataContentInfo the encryptedContent is missing in the EncryptedContentInfo structure.
NOTE: This method only indicates the presence of protected content. There is no way to distinguish between missing content and empty protected content.
protected abstract void setExposedContent(byte[] expContent)
isDetached()public byte[] computeDigest(java.security.MessageDigest md)
Note the changes in the Method signature
Previously public byte[] computeDigest (oracle.security.crypto.core.MessageDigest md)
Now public byte[] computeDigest (java.security.MessageDigest md)
md - The message digest.getExposedContent()
public void input(java.io.InputStream is)
throws java.io.IOException
input in interface oracle.security.crypto.util.Streamableis - The input stream containing CMS Objects.java.io.IOException - An I/O error occurred or the CMS Object encoding was incorrect or the CMS Object content type is not supported.
protected abstract void inputContent(java.io.InputStream is)
throws java.io.IOException
This method must be implemented by subclasses. It is unlikely that package users will ever need to call it directly.
java.io.IOException
public void output(java.io.OutputStream os)
throws java.io.IOException
You must ensure that the CMSContentInfo object has been properly initialized.
output in interface oracle.security.crypto.util.Streamablejava.io.IOException - If the content is null or an I/O error occurs.public int length()
length in interface oracle.security.crypto.util.Streamableprotected void update()
|
Oracle Fusion Middleware CMS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10667-05 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||