Skip navigation links

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

E10667-03


oracle.security.crypto.cms
Class CMSInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by oracle.security.crypto.cms.CMSInputStream

All Implemented Interfaces:
java.io.Closeable
Direct Known Subclasses:
CMSAuthenticatedDataInputStream, CMSCompressedDataInputStream, CMSDigestedDataInputStream, CMSEncryptedDataInputStream, CMSEnvelopedDataInputStream, CMSSignedDataInputStream

public abstract class CMSInputStream
extends java.io.FilterInputStream

This abstract class is the superclass of all classes that implement an input stream filter for reading CMS Objects. A CMSInputStream reads its input in the form of a CMS ContentInfo structure in one pass, eliminating the necessity to accumulate all of the input data.

In the case where a CMSInputConnector is provided instead of an input stream, it expects the Content field of the CMS ContentInfo structure i.e. the underlying input stream must be positioned just after the explicit [0] tag wrapper.

NOTE: The CMSInputStream class allows you to read detached CMS objects but you will not be able to verify the signature, digest or authentication code of the detached CMS Object. Please use the CMSContentInfo to process detached CMS Objects.

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

See Also:
CMSContentInfo.input(java.io.InputStream), CMSContentInfo.inputInstance(java.io.InputStream), CMSInputConnector

Field Summary

 

Fields inherited from class java.io.FilterInputStream
in

 

Constructor Summary
CMSInputStream(java.io.InputStream in)
          Creates a CMSInputStream.

 

Method Summary
abstract  oracle.security.crypto.asn1.ASN1ObjectID getEnclosedContentType()
          Returns the content type of the underlying content.
abstract  void terminate()
          Ensures that the CMS Object in the input stream has been completely read.

 

Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip

 

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

 

Constructor Detail

CMSInputStream

public CMSInputStream(java.io.InputStream in)
Creates a CMSInputStream.
Parameters:
in - The underlying input stream.

Method Detail

getEnclosedContentType

public abstract oracle.security.crypto.asn1.ASN1ObjectID getEnclosedContentType()
                                                                         throws java.io.IOException
Returns the content type of the underlying content.
Returns:
The content type identifier.
Throws:
An - I/O error occurred or the input encoding is incorrect.
java.io.IOException

terminate

public abstract void terminate()
                        throws java.io.IOException
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.

Throws:
java.io.IOException - There is still some unread underlying content in the input stream or 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-03


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