com.ibm.security12.sun.security.x509
Class DNSName

java.lang.Object
  |
  +--com.ibm.security12.sun.security.x509.DNSName

public class DNSName
extends Object
implements GeneralNameInterface

This class implements the DNSName as required by the GeneralNames ASN.1 object.

Version:
1.6
Author:
Amit Kapoor, Hemma Prafullchandra

Constructor Summary
DNSName(DerValue derValue)
          Create the DNSName object from the passed encoded Der value.
DNSName(String name)
          Create the DNSName object with the specified name.
 
Method Summary
 void encode(DerOutputStream out)
          Encode the DNS name into the DerOutputStream.
 int getType()
          Return the type of the GeneralName.
 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
 

Constructor Detail

DNSName

public DNSName(DerValue derValue)
        throws IOException
Create the DNSName object from the passed encoded Der value.
Parameters:
derValue - the encoded DER DNSName.
Throws:
IOException - on error.

DNSName

public DNSName(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 interface GeneralNameInterface

encode

public void encode(DerOutputStream out)
            throws IOException
Encode the DNS name into the DerOutputStream.
Specified by:
encode in interface GeneralNameInterface
Parameters:
out - the DER stream to encode the DNSName to.
Throws:
IOException - on encoding errors.

toString

public String toString()
Convert the name into user readable string.
Overrides:
toString in class Object