APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.pkcs10

public Class PKCS10Attributes

extends Object
implements DerEncoder
Class Inheritance
All Implemented Interfaces
sun.security.util.DerEncoder
Imports
java.io.IOException, java.util.Collection, .Collections, .Enumeration, .Hashtable, sun.security.util.DerEncoder, .DerInputStream, .DerOutputStream, .DerValue

This class defines the PKCS10 attributes for the request. The ASN.1 syntax for this is:
Attributes ::= SET OF Attribute
Authors
Amit Kapoor, Hemma Prafullchandra
See Also
PKCS10, PKCS10Attribute

Field Summary

Modifier and TypeField and Description
private final Hashtable<String, PKCS10Attribute>

Constructor Summary

AccessConstructor and Description
public
PKCS10Attributes()

Default constructor for the PKCS10 attribute.

public
PKCS10Attributes(PKCS10Attribute[]
the array of PKCS10Attribute objects.
attrs
)

Create the object from the array of PKCS10Attribute objects.

public
PKCS10Attributes(DerInputStream
the DerInputStream to read the attributes from.
in
)

Create the object, decoding the values from the passed DER stream.

Method Summary

Modifier and TypeMethod and Description
public void
deleteAttribute(String name)

Delete the attribute value.

public void
encode(DerOutputStream
the DerOutputStream to marshal the contents to.
out
)

Implements sun.security.util.DerEncoder.encode.

Encode the attributes in DER form to the stream.

public boolean

Returns:

true if all the entries match that of the Other, false otherwise.
equals
(Object
the object to test for equality with this PKCS10Attributes.
other
)

Overrides java.lang.Object.equals.

Compares this PKCS10Attributes for equality with the specified object.

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

Returns:

the hashcode value for this PKCS10Attributes
hashCode
()

Overrides java.lang.Object.hashCode.

Returns the hashcode value for this PKCS10Attributes.

public void
setAttribute(String name, Object obj)

Set the attribute value.

public String

Returns:

a string representation of this PKCS10Attributes.
toString
()

Overrides java.lang.Object.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).

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

mapback to summary
private final Hashtable<String, PKCS10Attribute> map

Constructor Detail

PKCS10Attributesback to summary
public PKCS10Attributes()

Default constructor for the PKCS10 attribute.

PKCS10Attributesback to summary
public PKCS10Attributes(PKCS10Attribute[] attrs)

Create the object from the array of PKCS10Attribute objects.

Parameters
attrs:PKCS10Attribute[]

the array of PKCS10Attribute objects.

PKCS10Attributesback to summary
public PKCS10Attributes(DerInputStream in) throws IOException

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

Parameters
in:DerInputStream

the DerInputStream to read the attributes from.

Exceptions
IOException:
on decoding errors.

Method Detail

deleteAttributeback to summary
public void deleteAttribute(String name)

Delete the attribute value.

encodeback to summary
public void encode(DerOutputStream out)

Implements sun.security.util.DerEncoder.encode.

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

Parameters
out:DerOutputStream

the DerOutputStream to marshal the contents to.

Annotations
@Override
equalsback to summary
public boolean equals(Object other)

Overrides java.lang.Object.equals.

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:Object

the object to test for equality with this PKCS10Attributes.

Returns:boolean

true if all the entries match that of the Other, false otherwise.

Annotations
@Override
getAttributeback to summary
public Object getAttribute(String name)

Get the attribute value.

getAttributesback to summary
public Collection<PKCS10Attribute> getAttributes()

Return a Collection of attributes existing within this PKCS10Attributes object.

getElementsback to summary
public Enumeration<PKCS10Attribute> getElements()

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

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns the hashcode value for this PKCS10Attributes.

Returns:int

the hashcode value for this PKCS10Attributes

Annotations
@Override
setAttributeback to summary
public void setAttribute(String name, Object obj)

Set the attribute value.

toStringback to summary
public String toString()

Overrides java.lang.Object.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:String

a string representation of this PKCS10Attributes.