public class TSAClient
extends java.lang.Object
TSAClient
represents as time stamp authority client.
This can be used for signing PDF file with time stamp.Constructor and Description |
---|
TSAClient(java.lang.String url,
java.lang.String username,
byte[] password)
Construct a
TSAClient object with specified url, username and password. |
Modifier and Type | Method and Description |
---|---|
byte[] |
getPassword()
Get the password of the tsa client.
|
byte[] |
getTimeStampToken(byte[] data)
Get time-stamp token from the time stamp authority URL.
|
java.lang.String |
getTsaURL()
Get the time stamp authority URL of current
TSAClient object. |
java.lang.String |
getUsername()
Get the username of current
TSAClient object. |
void |
setPassword(byte[] password)
Set the password of current
TSAClient object. |
void |
setTsaURL(java.lang.String tsaURL)
Set the time stamp authority URL of current
TSAClient object. |
void |
setUsername(java.lang.String username)
Set the username of current
TSAClient object. |
public TSAClient(java.lang.String url, java.lang.String username, byte[] password)
TSAClient
object with specified url, username and password.url
- The specified time stamp authority URL.username
- The specified username of the tsa client.password
- The specified password of the tsa client.public java.lang.String getTsaURL()
TSAClient
object.public void setTsaURL(java.lang.String tsaURL)
TSAClient
object.tsaURL
- The specified time stamp authority URL.public java.lang.String getUsername()
TSAClient
object.public void setUsername(java.lang.String username)
TSAClient
object.username
- The specified username of the tsa client.public byte[] getPassword()
public void setPassword(byte[] password)
TSAClient
object.password
- The specified password of the tsa client.public byte[] getTimeStampToken(byte[] data) throws PDFException
data
- The byte array data to be time-stamped.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException