net.aocat.psis.client.samples.timestamp.create
Class XMLTimestampCreationSample

java.lang.Object
  extended by net.aocat.psis.client.base.AbstractSample
      extended by net.aocat.psis.client.samples.timestamp.create.XMLTimestampCreationSample

public class XMLTimestampCreationSample
extends AbstractSample

Java code sample for XML timestamp creation.

Author:
aalcaide

Field Summary
private  java.lang.String OUT_DIR
           
private  boolean PRINT_REQUEST
           
private  boolean PRINT_RESPONSE
           
private  boolean SAVE_REQUEST_AND_RESPONSE
           
private  java.lang.String SIGN_REQUEST
           
private  java.lang.String SIGN_RESPONSE
           
 
Fields inherited from class net.aocat.psis.client.base.AbstractSample
factory, log
 
Constructor Summary
XMLTimestampCreationSample()
           
 
Method Summary
 void createTimestamp(java.io.File dataHash, java.io.File tsaCert)
          Creates an XML timestamp and saves it to disc.
static void main(java.lang.String[] args)
           
 
Methods inherited from class net.aocat.psis.client.base.AbstractSample
isResultWellFormed, isResultWellFormed, printSaveRequest, printSaveRequest, printSaveResponse, printSaveResponse, showResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRINT_REQUEST

private boolean PRINT_REQUEST

PRINT_RESPONSE

private boolean PRINT_RESPONSE

OUT_DIR

private java.lang.String OUT_DIR

SAVE_REQUEST_AND_RESPONSE

private boolean SAVE_REQUEST_AND_RESPONSE

SIGN_REQUEST

private java.lang.String SIGN_REQUEST

SIGN_RESPONSE

private java.lang.String SIGN_RESPONSE
Constructor Detail

XMLTimestampCreationSample

public XMLTimestampCreationSample()
Method Detail

main

public static void main(java.lang.String[] args)
Parameters:
args -
Throws:
java.io.IOException

createTimestamp

public void createTimestamp(java.io.File dataHash,
                            java.io.File tsaCert)
                     throws java.io.IOException
Creates an XML timestamp and saves it to disc. Prints and/or saves request and response.

Parameters:
dataHash - data hash to timestamp
tsaCert - TSA certificate
Throws:
java.io.IOException