public class GeneralName
extends java.lang.Object
implements com.tencent.kona.sun.security.util.DerEncoder
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
}
| Constructor and Description |
|---|
GeneralName(com.tencent.kona.sun.security.util.DerValue encName)
Create the object from its DER encoded value.
|
GeneralName(com.tencent.kona.sun.security.util.DerValue encName,
boolean nameConstraint)
Create the object from its DER encoded value.
|
GeneralName(GeneralNameInterface name)
Default constructor for the class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
encode(com.tencent.kona.sun.security.util.DerOutputStream out)
Encode the name to the specified DerOutputStream.
|
boolean |
equals(java.lang.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.
|
java.lang.String |
toString()
Return the name as user readable string
|
public GeneralName(GeneralNameInterface name)
name - the selected CHOICE from the list.java.lang.NullPointerException - if name is nullpublic GeneralName(com.tencent.kona.sun.security.util.DerValue encName)
throws java.io.IOException
encName - the DER encoded GeneralName.java.io.IOExceptionpublic GeneralName(com.tencent.kona.sun.security.util.DerValue encName,
boolean nameConstraint)
throws java.io.IOException
encName - the DER encoded GeneralName.nameConstraint - true if general name is a name constraintjava.io.IOExceptionpublic int getType()
public GeneralNameInterface getName()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - GeneralName to compare to thispublic int hashCode()
hashCode in class java.lang.Objectpublic void encode(com.tencent.kona.sun.security.util.DerOutputStream out)
encode in interface com.tencent.kona.sun.security.util.DerEncoderout - the DerOutputStream to encode the GeneralName to.