public abstract class CMSInputStream
extends java.io.FilterInputStream
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.
Constructor and Description |
---|
CMSInputStream(java.io.InputStream in)
Creates a
CMSInputStream . |
Modifier and Type | Method and Description |
---|---|
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.
|
public CMSInputStream(java.io.InputStream in)
CMSInputStream
.in
- The underlying input stream.public abstract oracle.security.crypto.asn1.ASN1ObjectID getEnclosedContentType() throws java.io.IOException
An
- I/O error occurred or the input encoding is incorrect.java.io.IOException
public abstract void terminate() throws java.io.IOException
Must be called after all the content enclosed by the CMS Object has been read.
java.io.IOException
- There is still some unread underlying content in the input stream or an I/O error occurred.