Package netscape.security.x509
Class DNSName
- java.lang.Object
-
- netscape.security.x509.DNSName
-
- All Implemented Interfaces:
java.io.Serializable
,GeneralNameInterface
public class DNSName extends java.lang.Object implements GeneralNameInterface
This class implements the DNSName as required by the GeneralNames ASN.1 object.- Version:
- 1.4
- Author:
- Amit Kapoor, Hemma Prafullchandra
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface netscape.security.x509.GeneralNameInterface
NAME_ANY, NAME_DIRECTORY, NAME_DNS, NAME_EDI, NAME_IP, NAME_OID, NAME_RFC822, NAME_URI, NAME_X400
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
encode(DerOutputStream out)
Encode the DNS name into the DerOutputStream.int
getType()
Return the type of the GeneralName.java.lang.String
getValue()
Get the raw DNSName value.java.lang.String
toString()
Convert the name into user readable string.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface netscape.security.x509.GeneralNameInterface
validSingle, validSubtree
-
-
-
-
Constructor Detail
-
DNSName
public DNSName(DerValue derValue) throws java.io.IOException
Create the DNSName object from the passed encoded Der value.- Parameters:
derValue
- the encoded DER DNSName.- Throws:
java.io.IOException
- on error.
-
DNSName
public DNSName(java.lang.String name)
Create the DNSName object with the specified name.- Parameters:
name
- the DNSName.
-
-
Method Detail
-
getType
public int getType()
Return the type of the GeneralName.- Specified by:
getType
in interfaceGeneralNameInterface
-
encode
public void encode(DerOutputStream out) throws java.io.IOException
Encode the DNS name into the DerOutputStream.- Specified by:
encode
in interfaceGeneralNameInterface
- Parameters:
out
- the DER stream to encode the DNSName to.- Throws:
java.io.IOException
- on encoding errors.
-
toString
public java.lang.String toString()
Convert the name into user readable string.- Overrides:
toString
in classjava.lang.Object
-
getValue
public java.lang.String getValue()
Get the raw DNSName value.
-
-