public class

PKCS10Attributes

extends Object
implements DerEncoder
java.lang.Object
   ↳ sun.security.pkcs.PKCS10Attributes

Class Overview

This class defines the PKCS10 attributes for the request. The ASN.1 syntax for this is:

 Attributes ::= SET OF Attribute
 

Summary

Public Constructors
PKCS10Attributes()
Default constructor for the PKCS10 attribute.
PKCS10Attributes(PKCS10Attribute[] attrs)
Create the object from the array of PKCS10Attribute objects.
PKCS10Attributes(DerInputStream in)
Create the object, decoding the values from the passed DER stream.
Public Methods
void deleteAttribute(String name)
Delete the attribute value.
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 PKCS10Attributes for equality with the specified object.
Object getAttribute(String name)
Get the attribute value.
Collection<PKCS10Attribute> getAttributes()
Return a Collection of attributes existing within this PKCS10Attributes object.
Enumeration<PKCS10Attribute> getElements()
Return an enumeration of names of attributes existing within this attribute.
int hashCode()
Returns a hashcode value for this PKCS10Attributes.
void setAttribute(String name, Object obj)
Set the attribute value.
String toString()
Returns a string representation of this PKCS10Attributes object in the form of a set of entries, enclosed in braces and separated by the ASCII characters "" (comma and space).
[Expand]
Inherited Methods
From class java.lang.Object
From interface sun.security.util.DerEncoder

Public Constructors

public PKCS10Attributes ()

Default constructor for the PKCS10 attribute.

public PKCS10Attributes (PKCS10Attribute[] attrs)

Create the object from the array of PKCS10Attribute objects.

Parameters
attrs the array of PKCS10Attribute objects.

public PKCS10Attributes (DerInputStream in)

Create the object, decoding the values from the passed DER stream. The DER stream contains the SET OF Attribute.

Parameters
in the DerInputStream to read the attributes from.
Throws
IOException on decoding errors.

Public Methods

public void deleteAttribute (String name)

Delete the attribute value.

public void derEncode (OutputStream out)

Encode the attributes in DER form to the stream. Implements the DerEncoder interface.

Parameters
out the OutputStream to marshal the contents to.
Throws
IOException on encoding errors.

public void encode (OutputStream out)

Encode the attributes in DER form to the stream.

Parameters
out the OutputStream to marshal the contents to.
Throws
IOException on encoding errors.

public boolean equals (Object other)

Compares this PKCS10Attributes for equality with the specified object. If the other object is an instanceof PKCS10Attributes, then all the entries are compared with the entries from this.

Parameters
other the object to test for equality with this PKCS10Attributes.
Returns
  • true if all the entries match that of the Other, false otherwise.

public Object getAttribute (String name)

Get the attribute value.

public Collection<PKCS10Attribute> getAttributes ()

Return a Collection of attributes existing within this PKCS10Attributes object.

public Enumeration<PKCS10Attribute> getElements ()

Return an enumeration of names of attributes existing within this attribute.

public int hashCode ()

Returns a hashcode value for this PKCS10Attributes.

Returns
  • the hashcode value.

public void setAttribute (String name, Object obj)

Set the attribute value.

public String toString ()

Returns a string representation of this PKCS10Attributes object in the form of a set of entries, enclosed in braces and separated by the ASCII characters "" (comma and space).

Overrides the toString method of Object.

Returns
  • a string representation of this PKCS10Attributes.