APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.timestamp

public Class HttpTimestamper

extends Object
implements Timestamper
Class Inheritance
All Implemented Interfaces
sun.security.timestamp.Timestamper
Imports
java.io.DataOutputStream, .EOFException, .IOException, java.net.URI, .HttpURLConnection, java.util.List, .Map, .Set, sun.security.util.Debug

A timestamper that communicates with a Timestamping Authority (TSA) over HTTP. It supports the Time-Stamp Protocol defined in: RFC 3161.
Author
Vincent Ryan
Since
1.5

Field Summary

Modifier and TypeField and Description
private static final int
private static final Debug
private static final String
private static final String
private final URI

Constructor Summary

AccessConstructor and Description
public
HttpTimestamper(URI
The location of the TSA. It must be an HTTP or HTTPS URI.
tsaURI
)

Creates a timestamper that connects to the specified TSA.

Method Summary

Modifier and TypeMethod and Description
public TSResponse

Returns:

The result of the timestamp query.
generateTimestamp
(TSRequest
The timestamp query.
tsQuery
)

Implements sun.security.timestamp.Timestamper.generateTimestamp.

Connects to the TSA and requests a timestamp.

private static void
verifyMimeType(String contentType)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CONNECT_TIMEOUTback to summary
private static final int CONNECT_TIMEOUT
debugback to summary
private static final Debug debug
TS_QUERY_MIME_TYPEback to summary
private static final String TS_QUERY_MIME_TYPE
TS_REPLY_MIME_TYPEback to summary
private static final String TS_REPLY_MIME_TYPE
tsaURIback to summary
private final URI tsaURI

Constructor Detail

HttpTimestamperback to summary
public HttpTimestamper(URI tsaURI)

Creates a timestamper that connects to the specified TSA.

Parameters
tsaURI:URI

The location of the TSA. It must be an HTTP or HTTPS URI.

Exceptions
IllegalArgumentException:
if tsaURI is not an HTTP or HTTPS URI

Method Detail

generateTimestampback to summary
public TSResponse generateTimestamp(TSRequest tsQuery) throws IOException

Implements sun.security.timestamp.Timestamper.generateTimestamp.

Connects to the TSA and requests a timestamp.

Parameters
tsQuery:TSRequest

The timestamp query.

Returns:TSResponse

The result of the timestamp query.

Exceptions
IOException:
The exception is thrown if a problem occurs while communicating with the TSA.
verifyMimeTypeback to summary
private static void verifyMimeType(String contentType) throws IOException