Skip to content

Most visited

Recently visited

navigation

Timestamp

public final class Timestamp
extends Object implements Serializable

java.lang.Object
   ↳ java.security.Timestamp


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.

Summary

Public constructors

Timestamp(Date timestamp, CertPath signerCertPath)

Constructs a Timestamp.

Public methods

boolean equals(Object obj)

Tests for equality between the specified object and this timestamp.

CertPath getSignerCertPath()

Returns the certificate path for the Timestamping Authority.

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 methods

From class java.lang.Object

Public constructors

Timestamp

Added in API level 1
Timestamp (Date timestamp, 
                CertPath signerCertPath)

Constructs a Timestamp.

Parameters
timestamp Date: is the timestamp's date and time. It must not be null.
signerCertPath CertPath: is the TSA's certificate path. It must not be null.
Throws
NullPointerException if timestamp or signerCertPath is null.

Public methods

equals

Added in API level 1
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 Object: the object to test for equality with this timestamp.
Returns
boolean true if the timestamp are considered equal, false otherwise.

getSignerCertPath

Added in API level 1
CertPath getSignerCertPath ()

Returns the certificate path for the Timestamping Authority.

Returns
CertPath The TSA's certificate path.

getTimestamp

Added in API level 1
Date getTimestamp ()

Returns the date and time when the timestamp was generated.

Returns
Date The timestamp's date and time.

hashCode

Added in API level 1
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
int a hash code value for this timestamp.

toString

Added in API level 1
String toString ()

Returns a string describing this timestamp.

Returns
String A string comprising the date and time of the timestamp and its signer's certificate.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.