Package org.apache.harmony.security.x501
Class AttributeTypeAndValue
- java.lang.Object
-
- org.apache.harmony.security.x501.AttributeTypeAndValue
-
public final class AttributeTypeAndValue extends Object
X.501 AttributeTypeAndValue
-
-
Field Summary
Fields Modifier and Type Field Description static ASN1SequenceASN1static ASN1TypeattributeValueAccording to RFC 3280 (http://www.ietf.org/rfc/rfc3280.txt) X.501 AttributeTypeAndValue structure is defined as follows: AttributeTypeAndValue ::= SEQUENCE { type AttributeType, value AttributeValue } AttributeType ::= OBJECT IDENTIFIER AttributeValue ::= ANY DEFINED BY AttributeType ...static ObjectIdentifierDCDomain component attribute (name from RFC 2253)static ObjectIdentifierEMAILADDRESSEmail Address attribute (name from API spec)
-
Constructor Summary
Constructors Constructor Description AttributeTypeAndValue(ObjectIdentifier oid, AttributeValue value)Creates AttributeTypeAndValue with OID and AttributeValue.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendName(String attrFormat, StringBuilder sb)Appends AttributeTypeAndValue string representationstatic ObjectIdentifiergetObjectIdentifier(String sOid)Parses OID string representation.ObjectIdentifiergetType()Gets type of the AttributeTypeAndValueAttributeValuegetValue()
-
-
-
Field Detail
-
DC
public static final ObjectIdentifier DC
Domain component attribute (name from RFC 2253)
-
EMAILADDRESS
public static final ObjectIdentifier EMAILADDRESS
Email Address attribute (name from API spec)
-
attributeValue
public static final ASN1Type attributeValue
According to RFC 3280 (http://www.ietf.org/rfc/rfc3280.txt) X.501 AttributeTypeAndValue structure is defined as follows: AttributeTypeAndValue ::= SEQUENCE { type AttributeType, value AttributeValue } AttributeType ::= OBJECT IDENTIFIER AttributeValue ::= ANY DEFINED BY AttributeType ... DirectoryString ::= CHOICE { teletexString TeletexString (SIZE (1..MAX)), printableString PrintableString (SIZE (1..MAX)), universalString UniversalString (SIZE (1..MAX)), utf8String UTF8String (SIZE (1.. MAX)), bmpString BMPString (SIZE (1..MAX)) }
-
ASN1
public static final ASN1Sequence ASN1
-
-
Constructor Detail
-
AttributeTypeAndValue
public AttributeTypeAndValue(ObjectIdentifier oid, AttributeValue value) throws IOException
Creates AttributeTypeAndValue with OID and AttributeValue.- Parameters:
oid- object identifiervalue- attribute value- Throws:
IOException
-
-
Method Detail
-
getObjectIdentifier
public static ObjectIdentifier getObjectIdentifier(String sOid) throws IOException
Parses OID string representation.- Parameters:
sOid- string representation of OID- Throws:
IOException- if OID can not be created from its string representation
-
appendName
public void appendName(String attrFormat, StringBuilder sb)
Appends AttributeTypeAndValue string representation- Parameters:
attrFormat- - format of DN
-
getType
public ObjectIdentifier getType()
Gets type of the AttributeTypeAndValue
-
getValue
public AttributeValue getValue()
-
-