|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.ibm.security.pkcsutil.PKCSAttributes
This class defines the ASN.1 attributes data type. The ASN.1 syntax is:
PKCSAttributes objects are immutable; they cannot be changed once created.
| Constructor Summary | |
PKCSAttributes()
Default constructor for the PKCSAttributes object. |
|
PKCSAttributes(byte[] der)
Create a PKCSAttributes object with a DER byte array. |
|
PKCSAttributes(byte[] der,
String provider)
Create a PKCSAttributes object with a DER byte array. |
|
PKCSAttributes(com.ibm.security.pkcsutil.DerInputStream in)
Create the object, decoding the values from the passed DER stream. |
|
PKCSAttributes(com.ibm.security.pkcsutil.DerInputStream in,
String provider)
Create the object, decoding the values from the passed DER stream. |
|
PKCSAttributes(PKCSAttribute[] attrs)
Create the object from the array of PKCSAttribute objects. |
|
PKCSAttributes(PKCSAttribute[] attrs,
String provider)
Create the object from the array of PKCSAttribute objects. |
|
PKCSAttributes(String provider)
|
|
PKCSAttributes(String filename,
boolean base64)
Create a PKCSAttributes with the filename of the DER-encoded or BASE64-encoded object. |
|
PKCSAttributes(String filename,
boolean base64,
String provider)
Create a PKCSAttributes with the filename of the DER-encoded or BASE64-encoded object. |
|
| Method Summary | |
PKCSAttributes |
addAttribute(PKCSAttribute attr)
Adds an attribute to this set of attributes and returns the combined set in a new object. |
PKCSAttributes |
addAttributes(PKCSAttributes attrs)
Adds the attributes in the input PKCSAttributes to this set of attributes and returns the combined set in a new object. |
Object |
clone()
Creates a clone of this PKCSAttribute object. |
protected void |
decode(com.ibm.security.pkcsutil.DerValue encoding)
Initializes a PKCSAttributes object from a DerValue. |
PKCSAttributes |
deleteAttribute(ObjectIdentifier oid)
Deletes the attribute value associated with the input object identifier. |
PKCSAttributes |
deleteAttribute(PKCSAttribute attr)
Delete the attribute from this set of attributes. |
PKCSAttributes |
deleteAttribute(String name)
Deletes the attribute value associated with the input object identifier string. |
void |
derEncode(OutputStream out)
Encode the attributes in DER form to the stream. |
void |
encode(OutputStream out)
Encode the attributes in DER form to the stream. |
boolean |
equals(Object other)
Compares this PKCSAttributes for equality with the specified object. |
byte[] |
generateDerEncoding()
Returns the byte array of the DER encoding. |
Object |
getAttribute(ObjectIdentifier oid)
Returns a copy of the attribute associated with the input object identifier. |
Object |
getAttribute(String name)
Returns a copy of the attribute associated with the input object identifier string. |
PKCSAttribute[] |
getAttributes()
Return the attributes as an array of PKCSAttribute objects. |
int |
hashCode()
Returns a hashcode value for this PKCSAttributes. |
int |
size()
Return the number of PKCSAttribute objects that the PKCSAttributes object contains. |
String |
toString()
Returns a string representation of this PKCSAttributes object in the form of a set of entries, enclosed in braces and separated by the ASCII characters ", " (comma and space). |
| Constructor Detail |
public PKCSAttributes()
public PKCSAttributes(String provider)
provider - the provider to be used.
public PKCSAttributes(com.ibm.security.pkcsutil.DerInputStream in)
throws IOException
in - the DerInputStream to read the attributes from.
public PKCSAttributes(com.ibm.security.pkcsutil.DerInputStream in,
String provider)
throws IOException
in - the DerInputStream to read the attributes from.provider - the provider to be used.
public PKCSAttributes(byte[] der)
throws IOException
der - a DER byte array of a PKCSAttributes object.
public PKCSAttributes(byte[] der,
String provider)
throws IOException
der - a DER byte array of a PKCSAttributes object.provider - the provider to be used.public PKCSAttributes(PKCSAttribute[] attrs)
attrs - the array of PKCSAttribute objects.
public PKCSAttributes(PKCSAttribute[] attrs,
String provider)
attrs - the array of PKCSAttribute objects.provider - the provider to be used.
public PKCSAttributes(String filename,
boolean base64)
throws IOException
filename - name of the DER-encoded or base64-encoded objectbase64 - true if BASE64-encoded, false if DER-encoded
public PKCSAttributes(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 provider to be used| Method Detail |
public Object clone()
public void encode(OutputStream out)
throws IOException
out - the OutputStream to marshal the contents to.
public byte[] generateDerEncoding()
throws IOException
public void derEncode(OutputStream out)
throws IOException
DerEncoder interface.out - the OutputStream to marshal the contents to.public PKCSAttributes addAttribute(PKCSAttribute attr)
attr - the attribute to add.public PKCSAttributes addAttributes(PKCSAttributes attrs)
attrs - the attributes to add.public Object getAttribute(String name)
name - Object Identifier stringpublic Object getAttribute(ObjectIdentifier oid)
oid - ObjectIdentifierpublic PKCSAttributes deleteAttribute(String name)
name - Object Identifier stringpublic PKCSAttributes deleteAttribute(ObjectIdentifier oid)
oid - ObjectIdentifierpublic PKCSAttributes deleteAttribute(PKCSAttribute attr)
attr - the attribute to deletepublic PKCSAttribute[] getAttributes()
public int size()
public boolean equals(Object other)
other object is an
instanceof PKCSAttributes, then
all the entries are compared with the entries from this.other - the object to test for equality with this PKCSAttributes.public int hashCode()
public String toString()
Overrides the toString method of Object.
protected void decode(com.ibm.security.pkcsutil.DerValue encoding)
throws IOException
encoding - a DER-encoded PKCSAttributes object.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||