Timestamp  |  API reference  |  Android Developers (original) (raw)

class Timestamp : Serializable

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(timestamp: Date!, signerCertPath: CertPath!) Constructs a Timestamp.
Public methods
Boolean equals(other: Any?) 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.

Public constructors

Timestamp

Timestamp(
    timestamp: Date!,
    signerCertPath: CertPath!)

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.
Exceptions
java.lang.NullPointerException if timestamp or signerCertPath is null.

Public methods

equals

fun equals(other: Any?): Boolean

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.
Return
Boolean true if the timestamp are considered equal, false otherwise.

getSignerCertPath

fun getSignerCertPath(): CertPath!

Returns the certificate path for the Timestamping Authority.

Return
CertPath! The TSA's certificate path.

getTimestamp

fun getTimestamp(): Date!

Returns the date and time when the timestamp was generated.

Return
Date! The timestamp's date and time.

hashCode

fun hashCode(): Int

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.

Return
Int a hash code value for this timestamp.

toString

fun toString(): String

Returns a string describing this timestamp.

Return
String A string comprising the date and time of the timestamp and its signer's certificate.

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2025-02-10 UTC.