Timestamp
Stay organized with collections
Save and categorize content based on your preferences.
This class encapsulates information about a signed timestamp.
It is immutable.
It includes the timestamp's date and time as well as information about the
Timestamping Authority (TSA) which generated and signed the timestamp.
Public Constructor Summary
Public Method Summary
boolean
|
equals( Object obj)
Tests for equality between the specified object and this
timestamp.
|
CertPath
|
|
Date
|
getTimestamp()
Returns the date and time when the timestamp was generated.
|
int
|
hashCode()
Returns the hash code value for this timestamp.
|
String
|
toString()
Returns a string describing this timestamp.
|
Inherited Method Summary
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals( Object obj)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait(long timeout, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long timeout)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
Public Constructors
public
Timestamp
(Date timestamp, CertPath signerCertPath)
Parameters
timestamp |
is the timestamp's date and time. It must not be null. |
signerCertPath |
is the TSA's certificate path. It must not be null. |
Public Methods
public
boolean
equals
(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.
Parameters
obj |
the object to test for equality with this timestamp. |
Returns
- true if the timestamp are considered equal, false otherwise.
public
CertPath
getSignerCertPath
()
Returns the certificate path for the Timestamping Authority.
Returns
- The TSA's certificate path.
public
Date
getTimestamp
()
Returns the date and time when the timestamp was generated.
Returns
- The timestamp's date and time.
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.
Returns
- a hash code value for this timestamp.
public
String
toString
()
Returns a string describing this timestamp.
Returns
- A string comprising the date and time of the timestamp and
its signer's certificate.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["The `Timestamp` class stores information about a signed timestamp, including its date/time and the Timestamping Authority (TSA) details."],["It is immutable, meaning its state cannot be changed after creation."],["A `Timestamp` object is created using a date and the TSA's certificate path."],["Methods are provided to retrieve the timestamp's date/time, the TSA's certificate path, and to check for equality between timestamps."],["It also provides a method to get a string representation of the timestamp, including its date/time and signer's certificate."]]],["The `Timestamp` class encapsulates a signed timestamp, including its date/time and the Timestamping Authority's (TSA) information. It is immutable and serializable. Key actions include constructing a `Timestamp` with a date/time and a certificate path, retrieving the TSA's certificate path via `getSignerCertPath()`, obtaining the timestamp's date/time with `getTimestamp()`, checking for equality between timestamps using `equals()`, getting a hash code through `hashCode()`, and generating a string description via `toString()`. It also inherits methods from Object.\n"]]