Skip navigation links

Oracle Fusion Middleware CMS Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10667-05


oracle.security.crypto.cms
Class CMSOutputStream

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

All Implemented Interfaces:
java.io.Closeable, java.io.Flushable
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.

Skip navigation links

Oracle Fusion Middleware CMS Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10667-05


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