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 CMSCompressedDataInputStream

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

All Implemented Interfaces:
java.io.Closeable

public class CMSCompressedDataInputStream
extends CMSInputStream

A CMSCompressedDataInputStream is used to read compressed-data CMS objects.

A CMSCompressedDataInputStream is essentially a input stream filter that unwraps the CMS compressed-data structure from the data read in.

You will be able to read a detached digested-data object using the CMSCompressedDataInputStream class but you will not be able to verify the digest.

IMPORTANT: This class processes large CMS compressed-data Objects more efficiently (Java VM memory usage) than the CMSCompressedDataContentInfo class.

See Also:
CMSInputConnector, CMSCompressedDataInputConnector, CMSCompressedDataContentInfo

Field Summary

 

Fields inherited from class java.io.FilterInputStream
in

 

Constructor Summary
CMSCompressedDataInputStream(CMSInputConnector conn)
          Creates a CMSCompressedDataInputStream.
CMSCompressedDataInputStream(java.io.InputStream in)
          Creates a CMSCompressedDataInputStream.

 

Method Summary
 int available()
           
 oracle.security.crypto.core.AlgorithmIdentifier getCompressionAlgID()
          Returns the message compressed algorithm.
 oracle.security.crypto.asn1.ASN1ObjectID getEnclosedContentType()
          Returns the content type of the digested content.
 oracle.security.crypto.asn1.ASN1Integer getVersion()
          Deprecated. As of Phaos CMS 2.0.1, replaced by getVersionNumber()
 java.math.BigInteger getVersionNumber()
          Returns the version number of this CMS Object.
 void mark(int readlimit)
          Not supported.
 boolean markSupported()
          Always returns false</false>.
 int read()
           
 int read(byte[] buffer, int offset, int len)
           
 void reset()
          Not supported.
 long skip(long n)
           
 void terminate()
          Finish reading the digested-data structure.

 

Methods inherited from class java.io.FilterInputStream
close, read

 

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

 

Constructor Detail

CMSCompressedDataInputStream

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

CMSCompressedDataInputStream

public CMSCompressedDataInputStream(CMSInputConnector conn)
Creates a CMSCompressedDataInputStream.
Parameters:
conn - The underlying input connector.

Method Detail

terminate

public void terminate()
               throws java.io.IOException
Finish reading the digested-data structure.

Invoke this method only after all the underlying content has been read.

Specified by:
terminate in class CMSInputStream
Throws:
java.io.IOException - An I/O error occurred or some of the underlying content is still present in the input stream.

getVersionNumber

public java.math.BigInteger getVersionNumber()
                                      throws java.io.IOException
Returns the version number of this CMS Object.
Returns:
The version number.
Throws:
java.io.IOException - An I/O error occurred or the input is incorrectly encoded.

getVersion

public oracle.security.crypto.asn1.ASN1Integer getVersion()
                                                   throws java.io.IOException
Deprecated. As of Phaos CMS 2.0.1, replaced by getVersionNumber()
Returns the version number of this CMS Object.
Returns:
The version number.
Throws:
java.io.IOException - An I/O error occurred or the input is incorrectly encoded.

getCompressionAlgID

public oracle.security.crypto.core.AlgorithmIdentifier getCompressionAlgID()
                                                                    throws java.io.IOException
Returns the message compressed algorithm.
Returns:
The compressed algorithm identifier.
Throws:
java.io.IOException - An I/O error occurred or the input is incorrectly encoded.

getEnclosedContentType

public oracle.security.crypto.asn1.ASN1ObjectID getEnclosedContentType()
                                                                throws java.io.IOException
Returns the content type of the digested content.
Specified by:
getEnclosedContentType in class CMSInputStream
Returns:
The content type identifier.
Throws:
java.io.IOException - An I/O error occurred or no input has been read.

read

public int read()
         throws java.io.IOException
Overrides:
read in class java.io.FilterInputStream
Throws:
java.io.IOException

read

public int read(byte[] buffer,
                int offset,
                int len)
         throws java.io.IOException
Overrides:
read in class java.io.FilterInputStream
Throws:
java.io.IOException

available

public int available()
              throws java.io.IOException
Overrides:
available in class java.io.FilterInputStream
Throws:
java.io.IOException

skip

public long skip(long n)
          throws java.io.IOException
Overrides:
skip in class java.io.FilterInputStream
Throws:
java.io.IOException

markSupported

public boolean markSupported()
Always returns false</false>.
Overrides:
markSupported in class java.io.FilterInputStream
Returns:
false (not supported)

mark

public void mark(int readlimit)
Not supported.
Overrides:
mark in class java.io.FilterInputStream

reset

public void reset()
           throws java.io.IOException
Not supported.
Overrides:
reset in class java.io.FilterInputStream
Throws:
java.io.IOException - always(not supported)

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.