Package java.security
Class Timestamp
java.lang.Object
java.security.Timestamp
- All Implemented Interfaces:
Serializable
public final class Timestamp extends Object implements Serializable
Timestamp represents a signed time stamp. Timestamp is
immutable.- See Also:
- Serialized Form
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description booleanequals(Object obj)Compares the specified object with thisTimestampfor equality and returnstrueif the specified object is equal,falseotherwise.CertPathgetSignerCertPath()Returns the certificate path of thisTimestamp.DategetTimestamp()Returns the date and time of thisTimestamp.inthashCode()Returns the hash code value for thisTimestamp.StringtoString()Returns a string containing a concise, human-readable description of thisTimestamp.
-
Constructor Details
-
Timestamp
Constructs a new instance ofTimestampwith the specifiedtimestampand the given certificate path.- Parameters:
timestamp- date and time.signerCertPath- the certificate path.- Throws:
NullPointerException- iftimestampisnullor ifsignerCertPathisnull.
-
-
Method Details
-
equals
Compares the specified object with thisTimestampfor equality and returnstrueif the specified object is equal,falseotherwise. The given object is equal to thisTimestamp, if it is an instance ofTimestamp, the two timestamps have an equal date and time and their certificate paths are equal.- Overrides:
equalsin classObject- Parameters:
obj- object to be compared for equality with thisTimestamp.- Returns:
trueif the specified object is equal to thisTimestamp, otherwisefalse.- See Also:
hashCode()
-
getSignerCertPath
Returns the certificate path of thisTimestamp.- Returns:
- the certificate path of this
Timestamp.
-
getTimestamp
Returns the date and time of thisTimestamp.- Returns:
- the date and time of this
Timestamp.
-
hashCode
public int hashCode()Returns the hash code value for thisTimestamp. Returns the same hash code forTimestamps that are equal to each other as required by the general contract ofObject.hashCode().- Overrides:
hashCodein classObject- Returns:
- the hash code value for this
Timestamp. - See Also:
Object.equals(Object),equals(Object)
-
toString
Returns a string containing a concise, human-readable description of thisTimestamp.
-