Class X500DirectoryAttribute

  • All Implemented Interfaces:
    ASN1Encodable

    public final class X500DirectoryAttribute
    extends Object
    implements ASN1Encodable
    An X.500 directory attribute, which is comprised of an attribute type OID and zero or more values, whose types are defined by the attribute type.
    Author:
    David M. Lloyd
    • Method Detail

      • create

        public static X500DirectoryAttribute create​(String attributeType,
                                                    Collection<ASN1Encodable> values)
        Construct a new instance.
        Parameters:
        attributeType - the attribute type OID (must not be null)
        values - the values collection (must not be null)
        Returns:
        the directory attribute
      • create

        public static X500DirectoryAttribute create​(String attributeType)
        Construct a new instance with no values.
        Parameters:
        attributeType - the attribute type OID (must not be null)
        Returns:
        the directory attribute
      • create

        public static X500DirectoryAttribute create​(String attributeType,
                                                    ASN1Encodable value)
        Construct a new instance with one value.
        Parameters:
        attributeType - the attribute type OID (must not be null)
        value - the single value (must not be null)
        Returns:
        the directory attribute
      • createUtf8

        public static X500DirectoryAttribute createUtf8​(String attributeType,
                                                        String stringValue)
        Construct a new instance with one UTF-8 value.
        Parameters:
        attributeType - the attribute type OID (must not be null)
        stringValue - the string value (must not be null)
        Returns:
        the directory attribute
      • createObjectId

        public static X500DirectoryAttribute createObjectId​(String attributeType,
                                                            String oid)
        Construct a new instance with one OID value.
        Parameters:
        attributeType - the attribute type OID (must not be null)
        oid - the OID (must not be null)
        Returns:
        the directory attribute
      • encodeTo

        public void encodeTo​(ASN1Encoder encoder)
        Description copied from interface: ASN1Encodable
        Encode this object.
        Specified by:
        encodeTo in interface ASN1Encodable
        Parameters:
        encoder - the encoder (must not be null)