Package org.apache.harmony.security.x501
Class Name
java.lang.Object
org.apache.harmony.security.x501.Name
public final class Name extends Object
X.501 Name
-
Field Summary
Fields Modifier and Type Field Description static ASN1SequenceOfASN1static ASN1SetOfASN1_RDNAccording 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 Summary
-
Method Summary
Modifier and Type Method Description byte[]getEncoded()Gets encoded form of DNStringgetName(String format)Returns Relative Distinguished Name asStringaccording the format requestedX500PrincipalgetX500Principal()ReturnsX500Principalinstance corresponding to thisNameinstance
-
Field Details
-
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 -
ASN1
-
-
Constructor Details
-
Name
Creates newNameinstance from its DER encoding- Parameters:
encoding- - ASN.1 DER encoding- Throws:
IOException- - if encoding is wrong
-
Name
Creates newNameinstance- Parameters:
name- - Name as String- Throws:
IOException- - if string is wrong
-
-
Method Details
-
getX500Principal
ReturnsX500Principalinstance corresponding to thisNameinstance- Returns:
- equivalent X500Principal object
-
getName
Returns Relative Distinguished Name asStringaccording the format requested- Parameters:
format- one of X500Principal.CANONICAL, X500Principal.RFC1779, or X500Principal.RFC2253, case insensitive
-
getEncoded
public byte[] getEncoded()Gets encoded form of DN- Returns:
- return encoding, no copying is performed
-