Class AttributeTypeAndValue

java.lang.Object
org.apache.harmony.security.x501.AttributeTypeAndValue

public final class AttributeTypeAndValue
extends Object
X.501 AttributeTypeAndValue
  • Field Details

    • 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 Details

    • AttributeTypeAndValue

      public AttributeTypeAndValue​(ObjectIdentifier oid, AttributeValue value) throws IOException
      Creates AttributeTypeAndValue with OID and AttributeValue.
      Parameters:
      oid - object identifier
      value - attribute value
      Throws:
      IOException
  • Method Details

    • 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()