APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.x509

public Class GeneralName

extends Object
implements DerEncoder
Class Inheritance
All Implemented Interfaces
sun.security.util.DerEncoder
Imports
java.io.IOException, sun.security.util.*

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
}
Authors
Amit Kapoor, Hemma Prafullchandra

Field Summary

Modifier and TypeField and Description
private final GeneralNameInterface

Constructor Summary

AccessConstructor and Description
public
GeneralName(GeneralNameInterface
the selected CHOICE from the list.
name
)

Default constructor for the class.

public
GeneralName(DerValue
the DER encoded GeneralName.
encName
)

Create the object from its DER encoded value.

public
GeneralName(DerValue
the DER encoded GeneralName.
encName
,
boolean
true if general name is a name constraint
nameConstraint
)

Create the object from its DER encoded value.

Method Summary

Modifier and TypeMethod and Description
public void
encode(DerOutputStream
the DerOutputStream to encode the GeneralName to.
out
)

Implements sun.security.util.DerEncoder.encode.

Encode the name to the specified DerOutputStream.

public boolean

Returns:

true if match
equals
(Object
GeneralName to compare to this
obj
)

Overrides java.lang.Object.equals.

Compare this GeneralName with another

public GeneralNameInterface
getName()

Return the GeneralNameInterface name.

public int
getType()

Return the type of the general name.

public int

Returns:

the hash code for this GeneralName
hashCode
()

Overrides java.lang.Object.hashCode.

Returns the hash code for this GeneralName.

public String
toString()

Overrides java.lang.Object.toString.

Return the name as user readable string

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

nameback to summary
private final GeneralNameInterface name

Constructor Detail

GeneralNameback to summary
public GeneralName(GeneralNameInterface name)

Default constructor for the class.

Parameters
name:GeneralNameInterface

the selected CHOICE from the list.

Exceptions
NullPointerException:
if name is null
GeneralNameback to summary
public GeneralName(DerValue encName) throws IOException

Create the object from its DER encoded value.

Parameters
encName:DerValue

the DER encoded GeneralName.

GeneralNameback to summary
public GeneralName(DerValue encName, boolean nameConstraint) throws IOException

Create the object from its DER encoded value.

Parameters
encName:DerValue

the DER encoded GeneralName.

nameConstraint:boolean

true if general name is a name constraint

Method Detail

encodeback to summary
public void encode(DerOutputStream out)

Implements sun.security.util.DerEncoder.encode.

Encode the name to the specified DerOutputStream.

Parameters
out:DerOutputStream

the DerOutputStream to encode the GeneralName to.

Annotations
@Override
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Compare this GeneralName with another

Parameters
obj:Object

GeneralName to compare to this

Returns:boolean

true if match

Annotations
@Override
getNameback to summary
public GeneralNameInterface getName()

Return the GeneralNameInterface name.

getTypeback to summary
public int getType()

Return the type of the general name.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns the hash code for this GeneralName.

Returns:int

the hash code for this GeneralName

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Return the name as user readable string