Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools CMS Java API Reference 10g Release 3 (10.1.3) B25377-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.security.crypto.cms
Class CMSSignedDataInputStream

`java.lang.Object
java.io.InputStream
java.io.FilterInputStream
oracle.security.crypto.cms.CMSInputStream
oracle.security.crypto.cms.CMSSignedDataInputStream`

public class CMSSignedDataInputStream
extends CMSInputStream

A `CMSSignedDataInputStream` is used to read `signed-data` CMS objects.

A `CMSSignedDataInputStream` is essentially a input stream filter that unwraps the CMS `signed-data` structure from the data read in.

You will be able to read a detached signed-data object using the `CMSSignedDataInputStream` class but you will not be able to verify the signature.

IMPORTANT: This class processes large CMS signed-data Objects more efficiently (Java VM memory usage) than the `CMSSignedDataContentInfo` class.

See Also:
  `CMSInputConnector`, `CMSSignedDataInputConnector`, `CMSSignedDataContentInfo`

Field Summary

Fields inherited from class java.io.FilterInputStream
`in`

Constructor Summary
`CMSSignedDataInputStream(CMSInputConnector conn)` Creates a `CMSSignedDataInputStream`.
`CMSSignedDataInputStream(java.io.InputStream in)` Creates a `CMSSignedDataInputStream`.

Method Summary
`int` | `available()`
`java.util.Vector` | `getCertificates()` Returns the list of certificates included with this signed data object.
`java.util.Vector` | `getCRLs()` Returns the list of CRLs included with this signed data object.
`java.util.Enumeration` | `getDigestAlgIDs()` Returns the list of Digest Algorithms.
`oracle.security.crypto.asn1.ASN1ObjectID` | `getEnclosedContentType()` Returns the content type of the signed content.
`CMSSignerInfo` | `getSignerInfo(oracle.security.crypto.cert.X509 signerCert)` Return the SignerInfo corresponding to the signer certificate.
`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 of this CMS Object.
`void` | `mark(int readlimit)` Not supported.
`boolean` | `markSupported()` Not Supported.
`int` | `read()`
`int` | `read(byte[] buffer, int offset, int len)`
`void` | `reset()` Not supported.
`java.util.Enumeration` | `signers()` Returns the enumeration of message signers.
`long` | `skip(long n)` Not supported.
`void` | `terminate()` Ensures that the CMS Object in the input stream has been completely read.
`void` | `verifySignature(oracle.security.crypto.cert.X509 signerCert)` Verify the Signature.

Methods inherited from class java.io.FilterInputStream
`close, read`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CMSSignedDataInputStream

    public CMSSignedDataInputStream(java.io.InputStream in)

  Creates a `CMSSignedDataInputStream`.
Parameters:
  `in` - The underlying input stream.

### CMSSignedDataInputStream

    public CMSSignedDataInputStream(CMSInputConnector conn)

  Creates a `CMSSignedDataInputStream`.
Parameters:
  `conn` - The underlying input connector.

Method Detail

### getEnclosedContentType

    public oracle.security.crypto.asn1.ASN1ObjectID getEnclosedContentType()
                                                                    throws java.io.IOException

  Returns the content type of the signed content.
  Specified by:
    `getEnclosedContentType` in class `CMSInputStream`
  Returns:
    The content type identifier.
  Throws:
    `java.io.IOException` - If the encoding is incorrect or an I/O error occurs.

### signers

    public java.util.Enumeration signers()
                                  throws java.io.IOException

  Returns the enumeration of message signers.
  Returns:
    The enumeration containing `CMSSignerInfo` objects.
  Throws:
    `java.io.IOException` - An I/O error occurred or the input is incorrectly encoded.

### getCertificates

    public java.util.Vector getCertificates()
                                     throws java.io.IOException

  Returns the list of certificates included with this signed data object.
  Returns:
    `Vector` containing `X509` objects or `null` if no list of certificates is present.
  Throws:
    `java.io.IOException` - An I/O error occurred or the input is incorrectly encoded.

### getCRLs

    public java.util.Vector getCRLs()
                             throws java.io.IOException

  Returns the list of CRLs included with this signed data object.
  Returns:
    `Vector` containing `CRL` objects or `null` if no list of CRLs is present.
  Throws:
    `java.io.IOException` - An I/O error occurred or the input is incorrectly encoded.

### getSignerInfo

    public CMSSignerInfo getSignerInfo(oracle.security.crypto.cert.X509 signerCert)
                                throws UnknownSignerException

  Return the SignerInfo corresponding to the signer certificate.
  Parameters:
    `signerCert` - The signer certificate.
  Returns:
    `CMSSignerInfo` object.
  Throws:
    `UnknownSignerException` - No SignerInfo matching the specified certificate.

### verifySignature

    public void verifySignature(oracle.security.crypto.cert.X509 signerCert)
                         throws oracle.security.crypto.core.AuthenticationException,
                                UnknownSignerException

  Verify the Signature.
  Parameters:
    `signerCert` - The signing certificate.
  Throws:
    `oracle.security.crypto.core.AuthenticationException` - Signature is not valid.
    `UnknownSignerException` - Could not find the matching SignerInfo.

### read

    public int read()
             throws java.io.IOException

  Throws:
    `java.io.IOException`

### read

    public int read(byte[] buffer,
                    int offset,
                    int len)
             throws java.io.IOException

  Throws:
    `java.io.IOException`

### available

    public int available()
                  throws java.io.IOException

  Throws:
    `java.io.IOException`

### skip

    public long skip(long n)
              throws java.io.IOException

  Not supported. Always throws an `IOException`.
  Throws:
    `java.io.IOException`

### markSupported

    public boolean markSupported()

  Not Supported.
  Returns:
    `false`.

### mark

    public void mark(int readlimit)

  Not supported.

### reset

    public void reset()
               throws java.io.IOException

  Not supported.
  Throws:
    `java.io.IOException` - always (not supported).

### terminate

    public void terminate()
                   throws java.io.IOException

  Description copied from class: `CMSInputStream`
  Ensures that the CMS Object in the input stream has been completely read.

  Must be called after all the content enclosed by the CMS Object has been read.

  Specified by:
    `terminate` in class `CMSInputStream`
  Throws:
    `java.io.IOException` - An I/O error occurred or the input encoding is incorrect.

### getVersionNumber

    public java.math.BigInteger getVersionNumber()
                                          throws java.io.IOException

  Returns the version number of this CMS Object.
  Returns:
    The version number.
  Throws:
    `java.io.IOException` - An I/O error occurred or the input is incorrectly encoded.

### getVersion

    public oracle.security.crypto.asn1.ASN1Integer getVersion()
                                                       throws java.io.IOException

  Deprecated. As of Phaos CMS 2.0.1, replaced by `getVersionNumber()`
  Returns the version number of this CMS Object.
  Returns:
    The version number.
  Throws:
    `java.io.IOException` - An I/O error occurred or the input encoding is incorrect.

### getDigestAlgIDs

    public java.util.Enumeration getDigestAlgIDs()
                                          throws java.io.IOException

  Returns the list of Digest Algorithms.
  Returns:
    An enumeration of digest algorithm identifiers.
  Throws:
    `java.io.IOException` - An I/O error occurred or the input encoding is incorrect.

Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools CMS Java API Reference 10g Release 3 (10.1.3) B25377-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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