|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.security.pkcsutil.PKCSDerObject | +--com.ibm.security.pkcs7.Content | +--com.ibm.security.pkcs7.Data
Implements the ASN.1 Data type.
This definition reflects PKCS #7 version 1.5 specifications with selected enhancements from the Cryptographic Message Syntax (CMS) RFC 2630 specifications.
Data objects are immutable; they cannot be changed once constructed and initialized. If the setData() method is called and the Data value has already been set, the setData() method will throw a PKCSException.
Fields inherited from class com.ibm.security.pkcsutil.PKCSDerObject |
provider |
Constructor Summary | |
Data()
Create an uninitialized Data object. |
|
Data(byte[] der)
Create a Data object with a DER-encoded byte array. |
|
Data(byte[] der,
String provider)
Create a Data object with a DER-encoded byte array. |
|
Data(String provider)
Create an uninitialized Data object. |
|
Data(String filename,
boolean base64)
Create a Data with the filename of the DER-encoded or BASE64-encoded object. |
|
Data(String filename,
boolean base64,
String provider)
Create a Data with the filename of the DER-encoded or BASE64-encoded object. |
Method Summary | |
Object |
clone()
Creates a clone of this Data object. |
protected void |
decode(com.ibm.security.pkcs7.DerValue encoding)
Initializes a Data object from a DerValue. |
void |
encode(OutputStream os)
Encodes this object to an OutputStream. |
boolean |
equals(Object other)
Determines if this Data object is equivalent to the input object. |
byte[] |
getData()
Returns a copy of the data contents of this Data object. |
ObjectIdentifier |
getObjectIdentifier()
Returns the ObjectIdentifer for the Data object. |
void |
setData(byte[] data)
Set the data contents for this Data object. |
String |
toString()
Returns a string representation of this Data object. |
Methods inherited from class com.ibm.security.pkcsutil.PKCSDerObject |
decode,
decode,
encode,
hashCode,
read,
readBASE64,
write,
write,
writeBASE64 |
Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public Data()
public Data(String provider)
provname
- the name of the java.security provider to usepublic Data(byte[] der) throws IOException
der
- a DER-encoded byte array of a Data object.public Data(byte[] der, String provider) throws IOException
der
- a DER-encoded byte array of a Data object.provider
- the name of the java.security provider to usepublic Data(String filename, boolean base64) throws IOException
filename
- name of the DER-encoded or base64-encoded objectbase64
- true if BASE64-encoded, false if DER-encodedpublic Data(String filename, boolean base64, String provider) throws IOException
filename
- name of the DER-encoded or base64-encoded objectbase64
- true if BASE64-encoded, false if DER-encodedprovider
- the name of the java.security provider to useMethod Detail |
public Object clone()
public boolean equals(Object other)
other
- the object to compare this one to.public ObjectIdentifier getObjectIdentifier()
public void encode(OutputStream os) throws IOException
os
- the OutputStream to write the encoded data to.protected void decode(com.ibm.security.pkcs7.DerValue encoding) throws IOException
encoding
- a DER-encoded Data object.public void setData(byte[] data) throws PKCSException
data
- byte array of the data.public byte[] getData()
public String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |