Build 1.0_r1(from source)

java.security.cert
Class CertPath

java.lang.Object
  extended by java.security.cert.CertPath
All Implemented Interfaces:
Serializable

public abstract class CertPath
extends Object
implements Serializable

An immutable certificate path that can be validated. All certificates in the path are of the same type (i.e., X509). A CertPath can be represented as a byte array in at least one supported encoding when serialized. When a List of the certificates is obtained it must be immutable. A CertPath must be thread-safe without requiring coordinated access.

See Also:
Serialized Form

Nested Class Summary
protected static class CertPath.CertPathRep
           
 
Constructor Summary
protected CertPath(String type)
           
 
Method Summary
 boolean equals(Object other)
          Returns true if Certificates in the list are the same type and the lists are equal (and by implication the certificates contained within are the same).
abstract  List<? extends Certificate> getCertificates()
          Returns an immutable List of the Certificates contained in the CertPath.
abstract  byte[] getEncoded()
          Returns an encoding of the CertPath using the default encoding
abstract  byte[] getEncoded(String encoding)
          Returns an encoding of the CertPath using the specified encoding
abstract  Iterator<String> getEncodings()
          Return an Iterator over the supported encodings for a representation of the certificate path.
 String getType()
          Returns the type of Certificate in the CertPath
 int hashCode()
          Overrides Object.hashCode() Defined as: hashCode = 31 * path.getType().hashCode() + path.getCertificates().hashCode();
 String toString()
          Returns a String representation of the CertPath Certificates.
protected  Object writeReplace()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CertPath

protected CertPath(String type)
Method Detail

getType

public String getType()
Returns the type of Certificate in the CertPath

Returns:
Certificate type

equals

public boolean equals(Object other)
Returns true if Certificates in the list are the same type and the lists are equal (and by implication the certificates contained within are the same).

Overrides:
equals in class Object
Parameters:
other - CertPath to be compared for equality
Returns:
boolean true if the object is the same as this object false if it is different from this object.
See Also:
Object.hashCode()

hashCode

public int hashCode()
Overrides Object.hashCode() Defined as: hashCode = 31 * path.getType().hashCode() + path.getCertificates().hashCode();

Overrides:
hashCode in class Object
Returns:
hash code for CertPath object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()
Returns a String representation of the CertPath Certificates. It is the result of calling toString on all Certificates in the List. Certificates

Overrides:
toString in class Object
Returns:
string representation of CertPath

getCertificates

public abstract List<? extends Certificate> getCertificates()
Returns an immutable List of the Certificates contained in the CertPath.

Returns:
list of Certificates in the CertPath

getEncoded

public abstract byte[] getEncoded()
                           throws CertificateEncodingException
Returns an encoding of the CertPath using the default encoding

Returns:
default encoding of the CertPath
Throws:
CertificateEncodingException

getEncoded

public abstract byte[] getEncoded(String encoding)
                           throws CertificateEncodingException
Returns an encoding of the CertPath using the specified encoding

Parameters:
encoding - encoding that should be generated
Returns:
default encoding of the CertPath
Throws:
CertificateEncodingException

getEncodings

public abstract Iterator<String> getEncodings()
Return an Iterator over the supported encodings for a representation of the certificate path.

Returns:
Iterator over supported encodings (as Strings)

writeReplace

protected Object writeReplace()
                       throws ObjectStreamException
Throws:
ObjectStreamException

Build 1.0_r1(from source)

Please submit a feedback, bug or feature