com.ibm.security.pkcs7
Class Content

java.lang.Object
  |
  +--com.ibm.security.pkcsutil.PKCSDerObject
        |
        +--com.ibm.security.pkcs7.Content
Direct Known Subclasses:
AuthenticatedData, Data, DigestedData, EncryptedData, EnvelopedData, SignedAndEnvelopedData, SignedData

public abstract class Content
extends PKCSDerObject

Implements an abstract Content class that will be subclassed by PKCS #7 classes.


Fields inherited from class com.ibm.security.pkcsutil.PKCSDerObject
provider
 
Constructor Summary
Content()
          Create an uninitialized Content object.
Content(byte[] der)
          Create a Content subclass with a DER-encoded byte array.
Content(byte[] der, String provider)
          Create a Content subclass with a DER-encoded byte array.
Content(String provider)
          Create an uninitialized Content object.
Content(String filename, boolean base64)
          Create a Content subclass with the filename of the DER-encoded or BASE64-encoded object.
Content(String filename, boolean base64, String provider)
          Create a Content subclass with the filename of the DER-encoded or BASE64-encoded object.
 
Method Summary
 String toString()
          Returns "PKCS7 Content".
 
Methods inherited from class com.ibm.security.pkcsutil.PKCSDerObject
decode, decode, encode, encode, equals, getObjectIdentifier, hashCode, read, readBASE64, write, write, writeBASE64
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Content

public Content()
Create an uninitialized Content object.

Content

public Content(String provider)
Create an uninitialized Content object.
Parameters:
provname - name of the java.security provider to use

Content

public Content(byte[] der)
        throws IOException
Create a Content subclass with a DER-encoded byte array.

Content

public Content(byte[] der,
               String provider)
        throws IOException
Create a Content subclass with a DER-encoded byte array.
Parameters:
provname - name of the java.security provider to use

Content

public Content(String filename,
               boolean base64)
        throws IOException
Create a Content subclass with the filename of the DER-encoded or BASE64-encoded object.
Parameters:
filename - name of the DER-encoded or BASE64-encoded object
base64 - true if BASE64-encoded, false if DER-encoded
Throws:
IOException - on decoding errors.

Content

public Content(String filename,
               boolean base64,
               String provider)
        throws IOException
Create a Content subclass with the filename of the DER-encoded or BASE64-encoded object.
Parameters:
filename - name of the DER-encoded or BASE64-encoded object
base64 - true if BASE64-encoded, false if DER-encoded
provname - name of the java.security provider to use
Throws:
IOException - on decoding errors.
Method Detail

toString

public String toString()
Returns "PKCS7 Content". This method should be overridden by subclasses.
Overrides:
toString in class PKCSDerObject