|
DigiStamp.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdgs.tlkt.demo.CreateTimeStamp
Time stamping the contents of a file and save the new time stamp to disk. Internet communication to the DigiStamp server is performed as part of the processing.
This source code is include with the SecureTime toolkit distribution.
Given a file name, the process performs:
| Field Summary | |
java.io.PrintStream |
myOut
where should the output go. |
boolean |
verbose
detailed output ? |
| Constructor Summary | |
CreateTimeStamp(boolean verbose,
java.io.PrintStream myOut)
Create a processing instance. |
|
| Method Summary | |
boolean |
compareResponse(CMSTsToken cms,
TsRequest tsr)
Did we get the expected data in the time stamp server response? |
boolean |
createTSofFile(java.lang.String fileToTimestamp,
java.lang.String outFileName)
This method demonstrates time stamping the contents of a file. |
static void |
main(java.lang.String[] args)
Execute the demo from a command line. |
boolean |
runDemo(java.lang.String fileToTimestamp,
java.lang.String outFileName)
A demostration of time stamp the content of a file. |
void |
setupConfig(java.lang.String account,
java.lang.String pswd)
Set your Internet communications preferences. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.io.PrintStream myOut
public boolean verbose
| Constructor Detail |
public CreateTimeStamp(boolean verbose,
java.io.PrintStream myOut)
main(String[]),
createTSofFile(String,String)| Method Detail |
public boolean compareResponse(CMSTsToken cms,
TsRequest tsr)
cms - dgs.tlkt.CMSTsToken
public boolean createTSofFile(java.lang.String fileToTimestamp,
java.lang.String outFileName)
throws ExceptionDgs,
java.security.NoSuchAlgorithmException,
java.io.IOException,
java.lang.InterruptedException
The configuration of Internet communications should have already been performed (@link #setupConfig(String, String))
fileToTimestamp - java.lang.StringoutFileName - java.lang.String
ExceptionDgs
java.security.NoSuchAlgorithmException
java.io.IOException
java.lang.InterruptedExceptionpublic static void main(java.lang.String[] args)
for details
public boolean runDemo(java.lang.String fileToTimestamp,
java.lang.String outFileName)
throws java.security.cert.CertificateEncodingException,
java.security.GeneralSecurityException,
ExceptionDgs,
java.security.NoSuchAlgorithmException,
java.io.IOException,
java.lang.InterruptedException
fileToTimestamp - input file that will be time stampedoutFileName - output file for the time stamp
java.security.cert.CertificateEncodingException
java.security.GeneralSecurityException
ExceptionDgs
java.security.NoSuchAlgorithmException
java.io.IOException
java.lang.InterruptedExceptionsetupConfig(String, String)
public void setupConfig(java.lang.String account,
java.lang.String pswd)
listOfServers.0 = tsatest1 listOfServers.1 = tsatest2With the above values, then all other configurations items use the defaults. Please see the Javadoc for the class
DgsConfig
to review the defaults.
account - -
your account number at DigiStamppswd - -
your account password
|
Copyright 2000-2005 DigiStamp, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||