Methods Summary |
---|
public boolean | equals(java.lang.Object other)Returns {@code true} if {@code Certificate}s in the list are the same
type and the lists are equal (and by implication the certificates
contained within are the same).
if (this == other) {
return true;
}
if (other instanceof CertPath) {
CertPath o = (CertPath)other;
if (getType().equals(o.getType())) {
if (getCertificates().equals(o.getCertificates())) {
return true;
}
}
}
return false;
|
public abstract java.util.List | getCertificates()Returns an immutable List of the {@code Certificate}s contained
in the {@code CertPath}.
|
public abstract byte[] | getEncoded()Returns an encoding of the {@code CertPath} using the default encoding.
|
public abstract byte[] | getEncoded(java.lang.String encoding)Returns an encoding of the {@code CertPath} using the specified encoding.
|
public abstract java.util.Iterator | getEncodings()Returns an {@code Iterator} over the supported encodings for a
representation of the certificate path.
|
public java.lang.String | getType()Returns the type of {@code Certificate} in this instance.
return type;
|
public int | hashCode()Overrides {@code Object.hashCode()}. The function is defined as follows:
{@code hashCode = 31 * path.getType().hashCode() +
path.getCertificates().hashCode();}
int hash = getType().hashCode();
hash = hash*31 + getCertificates().hashCode();
return hash;
|
public java.lang.String | toString()Returns a {@code String} representation of this {@code CertPath}
instance.
StringBuffer sb = new StringBuffer(getType());
sb.append(" Cert Path, len="); //$NON-NLS-1$
sb.append(getCertificates().size());
sb.append(": [\n"); //$NON-NLS-1$
int n=1;
// BEGIN android-changed
for (Iterator<? extends Certificate> i=getCertificates().iterator();
i.hasNext(); n++) {
sb.append("---------------certificate "); //$NON-NLS-1$
sb.append(n);
sb.append("---------------\n"); //$NON-NLS-1$
sb.append(((Certificate)i.next()).toString());
}
// END android-changed
sb.append("\n]"); //$NON-NLS-1$
return sb.toString();
|
protected java.lang.Object | writeReplace()Returns an alternate object to be serialized.
try {
return new CertPathRep(getType(), getEncoded());
} catch (CertificateEncodingException e) {
throw new NotSerializableException (
Messages.getString("security.66", e)); //$NON-NLS-1$
}
|