public abstract class CMSOutputStream
extends java.io.FilterOutputStream
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.
| Constructor and Description |
|---|
CMSOutputStream(java.io.OutputStream out)
Creates a
CMSOutputStream object. |
| Modifier and Type | Method and Description |
|---|---|
abstract 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.
|
public CMSOutputStream(java.io.OutputStream out)
CMSOutputStream object.out - The underlying output stream.public abstract ASN1ObjectID getExposedContentType()
public abstract void terminate()
throws java.io.IOException
Must be called after all the content enclosed by the CMS Object has been written.
java.io.IOException - An I/O error occurred.