Summary: Ctors | Methods | Inherited Methods | [Expand All]
public class

# TimestampingResult

extends Object
implements AutoCloseable

java.lang.Object
↳ | com.pdftron.pdf.TimestampingResult

## Class Overview

A class representing the result of testing a timestamping configuration.

## Summary

Public Constructors
| TimestampingResult(long impl_ptr)

Public Methods
long | __GetHandle()
void | close() Frees the native memory of the object.
void | destroy() Frees the native memory of the object.
byte[] | getData() If GetStatus gives true, returns the data from the completed timestamping operation, otherwise throws.
EmbeddedTimestampVerificationResult | getResponseVerificationResult() If a timestamp response was successfully retrieved from a timestamp authority, returns the result of verifying it.
boolean | getStatus() Retrieves the overall status of the timestamping configuration testing operation.
String | getString() Retrieves a result message regarding the timestamping configuration testing operation.
boolean | hasResponseVerificationResult() Returns whether a timestamp response verification result is available.

[Expand] Inherited Methods
From class java.lang.Object
boolean | equals(Object arg0)
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()
From interface java.lang.AutoCloseable
abstract void | close()

## Public Constructors

#### public TimestampingResult (long impl_ptr)

## Public Methods

#### public long __GetHandle ()

#### public void close ()

Frees the native memory of the object. This can be explicity called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.

##### Throws

PDFNetException |

#### public void destroy ()

Frees the native memory of the object. This can be explicity called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.

##### Throws

PDFNetException |

#### public byte[] getData ()

If GetStatus gives true, returns the data from the completed timestamping operation, otherwise throws. If this result was returned from TimestampOnNextSave, then this data is the timestamp token. However, if this result was returned from GenerateContentsWithEmbeddedTimestamp, then this data is the main document CMS signature of the DigitalSignatureField but with a newly-added embedded timestamp (unsigned signature-time-stamp attribute as specified in PAdES and PDF 2.0).

##### Returns

- the data representing the result of the timestamping operation, if GetStatus gives true

##### Throws

PDFNetException |

#### public EmbeddedTimestampVerificationResult getResponseVerificationResult ()

If a timestamp response was successfully retrieved from a timestamp authority, returns the result of verifying it. If a timestamp response was not received, throws. One should call HasResponseVerificationResult first to see if a detailed result is available before calling this function.

##### Returns

- a timestamp response verification result

##### Throws

PDFNetException |

#### public boolean getStatus ()

Retrieves the overall status of the timestamping configuration testing operation.

##### Returns

- a boolean value representing the status

##### Throws

PDFNetException |

#### public String getString ()

Retrieves a result message regarding the timestamping configuration testing operation. Output may change in future versions.

##### Returns

- a string result message.

##### Throws

PDFNetException |

#### public boolean hasResponseVerificationResult ()

Returns whether a timestamp response verification result is available. This means that false will be returned when a timestamp response was not received or was empty (e.g. network failures, improper server configuration, bad URL, etc.). This function should be called to check for the availability of a verification result before actually attempting to retrieve one using GetResponseVerificationResult (which throws if a result is not available).

##### Returns

- whether a timestamp response verification result is available

##### Throws

PDFNetException |