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 CMSEncryptedDataInputStream

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

public class CMSEncryptedDataInputStream
extends CMSInputStream

A `CMSEncryptedDataInputStream` is used to read `encrypted-data` CMS objects.

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

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

See Also:
  `CMSInputConnector`, `CMSEncryptedDataInputConnector`, `CMSEncryptedDataContentInfo`

Field Summary

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

Constructor Summary
`CMSEncryptedDataInputStream(CMSInputConnector conn, oracle.security.crypto.core.SymmetricKey contentEncryptionKey)` Creates a `CMSEncryptedDataInputStream`.
`CMSEncryptedDataInputStream(java.io.InputStream in, oracle.security.crypto.core.SymmetricKey contentEncryptionKey)` Creates a `CMSEncryptedDataInputStream`.

Method Summary
`int` | `available()`
`oracle.security.crypto.core.AlgorithmIdentifier` | `getContentEncryptionAlgID()` Returns the content encryption algorithm.
`oracle.security.crypto.asn1.ASN1ObjectID` | `getEnclosedContentType()` Returns the content type of the encrypted content.
`oracle.security.crypto.cert.AttributeSet` | `getUnprotectedAttributes()` Returns the Unprotected Attributes.
`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()` Always returns `false</false>.`
`int` | `read()`
`int` | `read(byte[] buffer, int offset, int len)`
`void` | `reset()` Not supported.
`long` | `skip(long n)`
`void` | `terminate()` Finish reading the `encrypted-data` structure.

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

### CMSEncryptedDataInputStream

    public CMSEncryptedDataInputStream(java.io.InputStream in,
                                       oracle.security.crypto.core.SymmetricKey contentEncryptionKey)

  Creates a `CMSEncryptedDataInputStream`.
Parameters:
  `in` - The underlying input stream.
  `contentEncryptionKey` - The content encryption key.

### CMSEncryptedDataInputStream

    public CMSEncryptedDataInputStream(CMSInputConnector conn,
                                       oracle.security.crypto.core.SymmetricKey contentEncryptionKey)

  Creates a `CMSEncryptedDataInputStream`.
Parameters:
  `conn` - The underlying input connector.
  `contentEncryptionKey` - The content encryption key.

Method Detail

### 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

  Throws:
    `java.io.IOException`

### markSupported

    public boolean markSupported()

  Always returns `false</false>.`
  `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

  Finish reading the `encrypted-data` structure.

  This method should be invoked only after all the enclosed content has been read from the input stream.

  Specified by:
    `terminate` in class `CMSInputStream`
  Throws:
    `java.io.IOException` - If any enclosed content is still present in the input stream or an I/O error occurred.

### getVersionNumber

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

  Returns the version number of this CMS Object.
  Returns:
    The version number as an ASN1Integer.
  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` - If the input encoding is incorrect or an I/O error occurred.

### getEnclosedContentType

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

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

### getContentEncryptionAlgID

    public oracle.security.crypto.core.AlgorithmIdentifier getContentEncryptionAlgID()
                                                                              throws java.io.IOException

  Returns the content encryption algorithm.
  Returns:
    The encryption algorithm identifier.
  Throws:
    `java.io.IOException` - If the input encoding is incorrect or an I/O error occurred.

### getUnprotectedAttributes

    public oracle.security.crypto.cert.AttributeSet getUnprotectedAttributes()
                                                                      throws java.io.IOException

  Returns the Unprotected Attributes.
  Returns:
    The set of unprotected attributes if present or `null` otherwise.
  Throws:
    `java.io.IOException` - If the input encoding is incorrect or an I/O error occurred.

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.