Methods Summary |
---|
public boolean | equals(java.lang.Object obj)Tests for equality between the specified object and this
timestamp. Two timestamps are considered equal if the date and time of
their timestamp's and their signer's certificate paths are equal.
if (obj == null || (!(obj instanceof Timestamp))) {
return false;
}
Timestamp that = (Timestamp)obj;
if (this == that) {
return true;
}
return (timestamp.equals(that.getTimestamp()) &&
signerCertPath.equals(that.getSignerCertPath()));
|
public java.security.cert.CertPath | getSignerCertPath()Returns the certificate path for the Timestamping Authority.
return signerCertPath;
|
public java.util.Date | getTimestamp()Returns the date and time when the timestamp was generated.
return new Date(timestamp.getTime()); // clone
|
public int | hashCode()Returns the hash code value for this timestamp.
The hash code is generated using the date and time of the timestamp
and the TSA's certificate path.
if (myhash == -1) {
myhash = timestamp.hashCode() + signerCertPath.hashCode();
}
return myhash;
|
public java.lang.String | toString()Returns a string describing this timestamp.
StringBuffer sb = new StringBuffer();
sb.append("(");
sb.append("timestamp: " + timestamp);
sb.append("TSA: " + signerCertPath.getCertificates().get(0));
sb.append(")");
return sb.toString();
|