public final class Name extends Object
| Modifier and Type | Field and Description |
|---|---|
static ASN1SequenceOf |
ASN1 |
static ASN1SetOf |
ASN1_RDN
According to RFC 3280 (http://www.ietf.org/rfc/rfc3280.txt)
X.501 Name structure is defined as follows:
Name ::= CHOICE {
RDNSequence }
RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
RelativeDistinguishedName ::=
SET OF AttributeTypeAndValue
|
| Constructor and Description |
|---|
Name(byte[] encoding)
Creates new
Name instance from its DER encoding |
Name(String name)
Creates new
Name instance |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getEncoded()
Gets encoded form of DN
|
String |
getName(String format)
Returns Relative Distinguished Name as
String according
the format requested |
X500Principal |
getX500Principal()
Returns
X500Principal instance corresponding to this
Name instance |
public static final ASN1SetOf ASN1_RDN
public static final ASN1SequenceOf ASN1
public Name(byte[] encoding)
throws IOException
Name instance from its DER encodingencoding - - ASN.1 DER encodingIOException - - if encoding is wrongpublic Name(String name) throws IOException
Name instancename - - Name as StringIOException - - if string is wrongpublic X500Principal getX500Principal()
X500Principal instance corresponding to this
Name instancepublic String getName(String format)
String according
the format requestedformat - one of X500Principal.CANONICAL, X500Principal.RFC1779, or
X500Principal.RFC2253, case insensitivepublic byte[] getEncoded()