Top Description Fields Constructors Methods
org.bouncycastle.asn1.cms

public Class AttributeTable

extends Object
Class Inheritance
Imports
java.util.Enumeration, .Hashtable, .Vector, org.bouncycastle.asn1.ASN1Encodable, .ASN1EncodableVector, .ASN1ObjectIdentifier, .ASN1Set, .DERSet

This is helper tool to construct Attributes sets.

Field Summary

Modifier and TypeField and Description
private Hashtable<K, V>

Constructor Summary

AccessConstructor and Description
public
public
public
public
public

Method Summary

Modifier and TypeMethod and Description
public AttributeTable

Returns:

a new table with the extra attribute in it.
add
(ASN1ObjectIdentifier
the type of the attribute to add.
attrType
,
ASN1Encodable
the value corresponding to the attribute (will be wrapped in a SET).
attrValue
)

Return a new table with the passed in attribute added.

private void
private Hashtable<K, V>
copyTable(Hashtable<K, V> in)

public Attribute

Returns:

first attribute found of type oid.
get
(ASN1ObjectIdentifier
type of attribute required.
oid
)

Return the first attribute matching the OBJECT IDENTIFIER oid.

public ASN1EncodableVector

Returns:

a vector of all the attributes found of type oid.
getAll
(ASN1ObjectIdentifier
type of attribute required.
oid
)

Return all the attributes matching the OBJECT IDENTIFIER oid.

public AttributeTable
public int
size()

public ASN1EncodableVector
public Attributes
public Hashtable<K, V>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attributesback to summary
private Hashtable<K, V> attributes

Constructor Detail

AttributeTableback to summary
public AttributeTable(Hashtable<K, V> attrs)
AttributeTableback to summary
public AttributeTable(ASN1EncodableVector v)
AttributeTableback to summary
public AttributeTable(ASN1Set s)
AttributeTableback to summary
public AttributeTable(Attribute attr)
AttributeTableback to summary
public AttributeTable(Attributes attrs)

Method Detail

addback to summary
public AttributeTable add(ASN1ObjectIdentifier attrType, ASN1Encodable attrValue)

Return a new table with the passed in attribute added.

Parameters
attrType:ASN1ObjectIdentifier

the type of the attribute to add.

attrValue:ASN1Encodable

the value corresponding to the attribute (will be wrapped in a SET).

Returns:AttributeTable

a new table with the extra attribute in it.

addAttributeback to summary
private void addAttribute(ASN1ObjectIdentifier oid, Attribute a)
copyTableback to summary
private Hashtable<K, V> copyTable(Hashtable<K, V> in)
getback to summary
public Attribute get(ASN1ObjectIdentifier oid)

Return the first attribute matching the OBJECT IDENTIFIER oid.

Parameters
oid:ASN1ObjectIdentifier

type of attribute required.

Returns:Attribute

first attribute found of type oid.

getAllback to summary
public ASN1EncodableVector getAll(ASN1ObjectIdentifier oid)

Return all the attributes matching the OBJECT IDENTIFIER oid. The vector will be empty if there are no attributes of the required type present.

Parameters
oid:ASN1ObjectIdentifier

type of attribute required.

Returns:ASN1EncodableVector

a vector of all the attributes found of type oid.

removeback to summary
public AttributeTable remove(ASN1ObjectIdentifier attrType)
sizeback to summary
public int size()
toASN1EncodableVectorback to summary
public ASN1EncodableVector toASN1EncodableVector()
toASN1Structureback to summary
public Attributes toASN1Structure()
toHashtableback to summary
public Hashtable<K, V> toHashtable()