Top Description Fields Constructors Methods
sun.security.x509

public Class GeneralNames

extends Object
Class Inheritance
Imports
java.util.*, java.io.IOException, sun.security.util.*

This object class represents the GeneralNames type required in X509 certificates.

The ASN.1 syntax for this is:

GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
Authors
Amit Kapoor, Hemma Prafullchandra

Field Summary

Modifier and TypeField and Description
private final List<GeneralName>

Constructor Summary

AccessConstructor and Description
public
GeneralNames(DerValue
the DerValue to construct the GeneralNames from.
derVal
)

Create the GeneralNames, decoding from the passed DerValue.

public
GeneralNames()

The default constructor for this class.

Method Summary

Modifier and TypeMethod and Description
public GeneralNames
public void
encode(DerOutputStream
the DerOutputStream to write the extension to.
out
)

Write the extension to the DerOutputStream.

public boolean

Returns:

true if this equals obj
equals
(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

compare this GeneralNames to other object for equality

public GeneralName
get(int index)

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public boolean
public Iterator<GeneralName>
public List<GeneralName>
public int
size()

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

namesback to summary
private final List<GeneralName> names

Constructor Detail

GeneralNamesback to summary
public GeneralNames(DerValue derVal) throws IOException

Create the GeneralNames, decoding from the passed DerValue.

Parameters
derVal:DerValue

the DerValue to construct the GeneralNames from.

Annotations
@SuppressWarnings:this-escape
Exceptions
IOException:
on error.
GeneralNamesback to summary
public GeneralNames()

The default constructor for this class.

Method Detail

addback to summary
public GeneralNames add(GeneralName name)
encodeback to summary
public void encode(DerOutputStream out)

Write the extension to the DerOutputStream.

Parameters
out:DerOutputStream

the DerOutputStream to write the extension to.

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

compare this GeneralNames to other object for equality

Parameters
obj:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

true if this equals obj

getback to summary
public GeneralName get(int index)
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

isEmptyback to summary
public boolean isEmpty()
iteratorback to summary
public Iterator<GeneralName> iterator()
namesback to summary
public List<GeneralName> names()
sizeback to summary
public int size()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object