public class

GeneralName

extends Object
java.lang.Object
   ↳ sun.security.x509.GeneralName

Class Overview

This class implements the ASN.1 GeneralName object class.

The ASN.1 syntax for this is:

 GeneralName ::= CHOICE {
    otherName                       [0]     OtherName,
    rfc822Name                      [1]     IA5String,
    dNSName                         [2]     IA5String,
    x400Address                     [3]     ORAddress,
    directoryName                   [4]     Name,
    ediPartyName                    [5]     EDIPartyName,
    uniformResourceIdentifier       [6]     IA5String,
    iPAddress                       [7]     OCTET STRING,
    registeredID                    [8]     OBJECT IDENTIFIER
 }
 

Summary

Public Constructors
GeneralName(GeneralNameInterface name)
Default constructor for the class.
GeneralName(DerValue encName)
Create the object from its DER encoded value.
GeneralName(DerValue encName, boolean nameConstraint)
Create the object from its DER encoded value.
Public Methods
void encode(DerOutputStream out)
Encode the name to the specified DerOutputStream.
boolean equals(Object other)
Compare this GeneralName with another
GeneralNameInterface getName()
Return the GeneralNameInterface name.
int getType()
Return the type of the general name.
int hashCode()
Returns the hash code for this GeneralName.
String toString()
Return the name as user readable string
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public GeneralName (GeneralNameInterface name)

Default constructor for the class.

Parameters
name the selected CHOICE from the list.
Throws
NullPointerException if name is null

public GeneralName (DerValue encName)

Create the object from its DER encoded value.

Parameters
encName the DER encoded GeneralName.
Throws
IOException

public GeneralName (DerValue encName, boolean nameConstraint)

Create the object from its DER encoded value.

Parameters
encName the DER encoded GeneralName.
nameConstraint true if general name is a name constraint
Throws
IOException

Public Methods

public void encode (DerOutputStream out)

Encode the name to the specified DerOutputStream.

Parameters
out the DerOutputStream to encode the the GeneralName to.
Throws
IOException on encoding errors.

public boolean equals (Object other)

Compare this GeneralName with another

Parameters
other GeneralName to compare to this
Returns
  • true if this object is the same as the obj argument; false otherwise.

public GeneralNameInterface getName ()

Return the GeneralNameInterface name.

public int getType ()

Return the type of the general name.

public int hashCode ()

Returns the hash code for this GeneralName.

Returns
  • a hash code value.

public String toString ()

Return the name as user readable string

Returns
  • a string representation of the object.