public class X500Name extends ASN1Object implements ASN1Choice
Name ::= CHOICE {
RDNSequence }
RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue
AttributeTypeAndValue ::= SEQUENCE {
type OBJECT IDENTIFIER,
value ANY }
| Constructor and Description |
|---|
X500Name(RDN[] rDNs) |
X500Name(String dirName) |
X500Name(X500NameStyle style,
RDN[] rDNs) |
X500Name(X500NameStyle style,
String dirName) |
X500Name(X500NameStyle style,
X500Name name) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
test for equality - note: case is ignored.
|
ASN1ObjectIdentifier[] |
getAttributeTypes()
return an array of OIDs contained in the attribute type of each RDN in structure order.
|
static X500NameStyle |
getDefaultStyle()
Return the current default style.
|
static X500Name |
getInstance(ASN1TaggedObject obj,
boolean explicit)
Return a X500Name based on the passed in tagged object.
|
static X500Name |
getInstance(Object obj) |
static X500Name |
getInstance(X500NameStyle style,
Object obj) |
RDN[] |
getRDNs()
return an array of RDNs in structure order.
|
RDN[] |
getRDNs(ASN1ObjectIdentifier attributeType)
return an array of RDNs containing the attribute type given by OID in structure order.
|
int |
hashCode()
Returns an integer hash code for this object.
|
static void |
setDefaultStyle(X500NameStyle style)
Set the default style for X500Name construction.
|
ASN1Primitive |
toASN1Primitive()
Method providing a primitive representation of this object suitable for encoding.
|
String |
toString()
Returns a string containing a concise, human-readable description of this
object.
|
getEncoded, getEncoded, hasEncodedTagValue, toASN1Objectpublic X500Name(X500NameStyle style, X500Name name)
public X500Name(RDN[] rDNs)
public X500Name(X500NameStyle style, RDN[] rDNs)
public X500Name(String dirName)
public X500Name(X500NameStyle style, String dirName)
public static X500Name getInstance(ASN1TaggedObject obj, boolean explicit)
obj - tag object holding name.explicit - true if explicitly tagged false otherwise.public static X500Name getInstance(X500NameStyle style, Object obj)
public RDN[] getRDNs()
public ASN1ObjectIdentifier[] getAttributeTypes()
public RDN[] getRDNs(ASN1ObjectIdentifier attributeType)
attributeType - the type OID we are looking for.public ASN1Primitive toASN1Primitive()
ASN1ObjecttoASN1Primitive in interface ASN1EncodabletoASN1Primitive in class ASN1Objectpublic int hashCode()
ObjectObject.equals(java.lang.Object) returns true must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCode method
if you intend implementing your own hashCode method.
hashCode in class ASN1ObjectObject.equals(java.lang.Object)public boolean equals(Object obj)
equals in class ASN1Objectobj - the object to compare this instance with.true if the specified object is equal to this Object; false otherwise.Object.hashCode()public String toString()
ObjectgetClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString method
if you intend implementing your own toString method.
public static void setDefaultStyle(X500NameStyle style)
style - an X500NameStylepublic static X500NameStyle getDefaultStyle()