Package org.wildfly.security.x500
Class X500AttributeTypeAndValue
- java.lang.Object
-
- org.wildfly.security.x500.X500AttributeTypeAndValue
-
- All Implemented Interfaces:
ASN1Encodable
public final class X500AttributeTypeAndValue extends Object implements ASN1Encodable
An X.500 directory attribute, which is comprised of an attribute type OID and a single values, whose type is defined by the attribute type.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static X500AttributeTypeAndValue
create(String attributeType, ASN1Encodable value)
Construct a new instance with the given value.static X500AttributeTypeAndValue
createObjectId(String attributeType, String oid)
Construct a new instance with an OID value.static X500AttributeTypeAndValue
createUtf8(String attributeType, String stringValue)
Construct a new instance with a UTF-8 value.void
encodeTo(ASN1Encoder encoder)
Encode this object.
-
-
-
Method Detail
-
create
public static X500AttributeTypeAndValue create(String attributeType, ASN1Encodable value)
Construct a new instance with the given value.- Parameters:
attributeType
- the attribute type OID (must not benull
)value
- the single value (must not benull
)- Returns:
- the directory attribute
-
createUtf8
public static X500AttributeTypeAndValue createUtf8(String attributeType, String stringValue)
Construct a new instance with a UTF-8 value.- Parameters:
attributeType
- the attribute type OID (must not benull
)stringValue
- the string value (must not benull
)- Returns:
- the directory attribute
-
createObjectId
public static X500AttributeTypeAndValue createObjectId(String attributeType, String oid)
Construct a new instance with an OID value.- Parameters:
attributeType
- the attribute type OID (must not benull
)oid
- the OID (must not benull
)- Returns:
- the directory attribute
-
encodeTo
public void encodeTo(ASN1Encoder encoder)
Description copied from interface:ASN1Encodable
Encode this object.- Specified by:
encodeTo
in interfaceASN1Encodable
- Parameters:
encoder
- the encoder (must not benull
)
-
-