Package org.bouncycastle.asn1.cms
Class AttributeTable
java.lang.Object
org.bouncycastle.asn1.cms.AttributeTable
This is helper tool to construct
Attributes
sets.-
Constructor Summary
ConstructorDescriptionAttributeTable
(Hashtable attrs) AttributeTable
(org.bouncycastle.asn1.ASN1EncodableVector v) AttributeTable
(org.bouncycastle.asn1.ASN1Set s) AttributeTable
(Attribute attr) AttributeTable
(Attributes attrs) -
Method Summary
Modifier and TypeMethodDescriptionadd
(org.bouncycastle.asn1.ASN1ObjectIdentifier attrType, org.bouncycastle.asn1.ASN1Encodable attrValue) Return a new table with the passed in attribute added.get
(org.bouncycastle.asn1.ASN1ObjectIdentifier oid) Return the first attribute matching the OBJECT IDENTIFIER oid.org.bouncycastle.asn1.ASN1EncodableVector
getAll
(org.bouncycastle.asn1.ASN1ObjectIdentifier oid) Return all the attributes matching the OBJECT IDENTIFIER oid.remove
(org.bouncycastle.asn1.ASN1ObjectIdentifier attrType) int
size()
org.bouncycastle.asn1.ASN1EncodableVector
-
Constructor Details
-
AttributeTable
-
AttributeTable
public AttributeTable(org.bouncycastle.asn1.ASN1EncodableVector v) -
AttributeTable
public AttributeTable(org.bouncycastle.asn1.ASN1Set s) -
AttributeTable
-
AttributeTable
-
-
Method Details
-
get
Return the first attribute matching the OBJECT IDENTIFIER oid.- Parameters:
oid
- type of attribute required.- Returns:
- first attribute found of type oid.
-
getAll
public org.bouncycastle.asn1.ASN1EncodableVector getAll(org.bouncycastle.asn1.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
- type of attribute required.- Returns:
- a vector of all the attributes found of type oid.
-
size
public int size() -
toHashtable
-
toASN1EncodableVector
public org.bouncycastle.asn1.ASN1EncodableVector toASN1EncodableVector() -
toASN1Structure
-
add
public AttributeTable add(org.bouncycastle.asn1.ASN1ObjectIdentifier attrType, org.bouncycastle.asn1.ASN1Encodable attrValue) Return a new table with the passed in attribute added.- Parameters:
attrType
- the type of the attribute to add.attrValue
- the value corresponding to the attribute (will be wrapped in a SET).- Returns:
- a new table with the extra attribute in it.
-
remove
-