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 CMSOutputStream

`java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
oracle.security.crypto.cms.CMSOutputStream`

Direct Known Subclasses:
  CMSAuthenticatedDataOutputStream, CMSCompressedDataOutputStream, CMSDigestedDataOutputStream, CMSEncryptedDataOutputStream, CMSEnvelopedDataOutputStream, CMSSignedDataOutputStream

public abstract class CMSOutputStream
extends java.io.FilterOutputStream

This abstract class is the superclass of all classes that implement an output stream filter for creating CMS Objects. A `CMSOutputStream` writes its output in the form of a CMS ContentInfo structure in one pass, eliminating the necessity to accumulate all of the input data before writing any output.

In the case where a `CMSOutputConnector` is provided instead of a `CMSOutputStream`, only the exposed content i.e. the Content field of the ContentInfo structure minus the explicit [0] tag is written to the underlying output stream.

IMPORTANT: This class generates large CMS Objects more efficiently (Java VM memory usage) than the `CMSContentInfo` class.

See Also:
  `CMSContentInfo.output(java.io.OutputStream)`, `CMSOutputConnector`

Field Summary

Fields inherited from class java.io.FilterOutputStream
`out`

Constructor Summary
`CMSOutputStream(java.io.OutputStream out)` Creates a `CMSOutputStream` object.

Method Summary
`abstract oracle.security.crypto.asn1.ASN1ObjectID` | `getExposedContentType()` Returns the content type of the data that is output to the underlying output stream.
`abstract void` | `terminate()` Ensures that the CMS Object has been written completely.

Methods inherited from class java.io.FilterOutputStream
`close, flush, write, write, write`

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

Constructor Detail

### CMSOutputStream

    public CMSOutputStream(java.io.OutputStream out)

  Creates a `CMSOutputStream` object.
Parameters:
  `out` - The underlying output stream.

Method Detail

### getExposedContentType

    public abstract oracle.security.crypto.asn1.ASN1ObjectID getExposedContentType()

  Returns the content type of the data that is output to the underlying output stream.
  Returns:
    The content type identifier.

### terminate

    public abstract void terminate()
                            throws java.io.IOException

  Ensures that the CMS Object has been written completely.

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

  Throws:
    `java.io.IOException` - 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.