Most visited

Recently visited

Added in API level 1

Timestamp

public final class Timestamp
extends Object implements Serializable

java.lang.Object
    java.security.Timestamp


该类封装有关签名时间戳的信息。 它是不可变的。 它包括时间戳记的日期和时间以及有关生成并签署时间戳记的时间戳权限(TSA)的信息。

摘要(Summary)

Public constructors

Timestamp(Date timestamp, CertPath signerCertPath)

构造一个时间戳。

公共方法(Public methods)

boolean equals(Object obj)

测试指定对象和此时间戳之间的相等性。

CertPath getSignerCertPath()

返回时间戳权限的证书路径。

Date getTimestamp()

返回时间戳生成时的日期和时间。

int hashCode()

返回此时间戳的哈希码值。

String toString()

返回描述此时间戳的字符串。

继承方法(Inherited methods)

From class java.lang.Object

Public constructors

Timestamp

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

构造一个时间戳。

参数(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)

测试指定对象和此时间戳之间的相等性。 如果两个时间戳的时间戳和他们的签名者的证书路径的日期和时间相等,则认为两个时间戳相等。

参数(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)
CertPath The TSA's certificate path.

getTimestamp

Added in API level 1
Date getTimestamp ()

返回时间戳生成时的日期和时间。

返回(Returns)
Date The timestamp's date and time.

hashCode

Added in API level 1
int hashCode ()

返回此时间戳的哈希码值。 哈希码使用时间戳和TSA的证书路径的日期和时间生成。

返回(Returns)
int a hash code value for this timestamp.

toString

Added in API level 1
String toString ()

返回描述此时间戳的字符串。

返回(Returns)
String A string comprising the date and time of the timestamp and its signer's certificate.

Hooray!