|
Préférences
Moteurs de recherche
|
|||||||||||||||||||||||||||||||
| JavaTM 2 Platform Std. Ed. v1.6.0
java.security.cert
|
||||||||||||||||||||||||||||||||
| Nested Class Summary | |
|---|---|
protected static class |
CertPath.CertPathRep
Alternate CertPath class for serialization. |
| Constructor Summary | |
|---|---|
protected |
CertPath(String type)
Creates a CertPath of the specified type. |
| Method Summary | |
|---|---|
boolean |
equals(Object other)
Compares this certification path for equality with the specified object. |
abstract List<? extends Certificate> |
getCertificates()
Returns the list of certificates in this certification path. |
abstract byte[] |
getEncoded()
Returns the encoded form of this certification path, using the default encoding. |
abstract byte[] |
getEncoded(String encoding)
Returns the encoded form of this certification path, using the specified encoding. |
abstract Iterator<String> |
getEncodings()
Returns an iteration of the encodings supported by this certification path, with the default encoding first. |
String |
getType()
Returns the type of Certificates in this certification
path. |
int |
hashCode()
Returns the hashcode for this certification path. |
String |
toString()
Returns a string representation of this certification path. |
protected Object |
writeReplace()
Replaces the CertPath to be serialized with a
CertPathRep object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected CertPath(String type)
CertPath of the specified type.
This constructor is protected because most users should use a
CertificateFactory to create CertPaths.
type - the standard name of the type of
Certificates in this path| Method Detail |
|---|
public String getType()
Certificates in this certification
path. This is the same string that would be returned by
cert.getType()
for all Certificates in the certification path.
Certificates in this certification
path (never null)public abstract Iterator<String> getEncodings()
Iterator via its remove method result in an
UnsupportedOperationException.
Iterator over the names of the supported
encodings (as Strings)public boolean equals(Object other)
CertPaths are equal if and only if their
types are equal and their certificate Lists (and by
implication the Certificates in those Lists)
are equal. A CertPath is never equal to an object that is
not a CertPath.
This algorithm is implemented by this method. If it is overridden, the behavior specified here must be maintained.
other - the object to test for equality with this certification path
Object.hashCode(),
Hashtablepublic int hashCode()
hashCode = path.getType().hashCode();
hashCode = 31*hashCode + path.getCertificates().hashCode();
This ensures that path1.equals(path2) implies that
path1.hashCode()==path2.hashCode() for any two certification
paths, path1 and path2, as required by the
general contract of Object.hashCode.
Object.equals(java.lang.Object),
Hashtablepublic String toString()
toString method on each of the
Certificates in the path.
public abstract byte[] getEncoded()
throws CertificateEncodingException
CertificateEncodingException - if an encoding error occurspublic abstract byte[] getEncoded(String encoding) throws CertificateEncodingException
encoding - the name of the encoding to use
CertificateEncodingException - if an encoding error occurs or
the encoding requested is not supportedpublic abstract List<? extends Certificate> getCertificates()
List returned must be immutable and thread-safe.
List of Certificates
(may be empty, but not null)protected Object writeReplace() throws ObjectStreamException
CertPath to be serialized with a
CertPathRep object.
CertPathRep to be serialized
ObjectStreamException - if a CertPathRep object
representing this certification path could not be created