com.sun.jini.tool
Class ComputeDigest

java.lang.Object
  extended by com.sun.jini.tool.ComputeDigest

public class ComputeDigest
extends Object

Prints the message digest for the contents of a URL. This utility is run from the command line.

An example command line (shown with lines wrapped for readability) is:

 java -jar install_dir/lib/computedigest.jar \
      install_dir/lib/reggie.jar \
      SHA-1
 
where install_dir is the directory where the Apache River release is installed. This command prints out the message digest for the reggie.jar JAR file, using the SHA-1 algorithm.

Since:
2.0
Author:
Sun Microsystems, Inc.

Field Summary
private static boolean resinit
           
private static ResourceBundle resources
           
 
Constructor Summary
private ComputeDigest()
           
 
Method Summary
private static String getString(String key)
           
static void main(String[] args)
          Prints the message digest for the contents of a URL.
private static void print(String key, String val)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resources

private static ResourceBundle resources

resinit

private static boolean resinit
Constructor Detail

ComputeDigest

private ComputeDigest()
Method Detail

main

public static void main(String[] args)
Prints the message digest for the contents of a URL. The command line arguments are:
 url [ algorithm ]
 
The first argument specifies the URL, which is parsed in the context of a file: URL. The second argument, if present, specifies the message digest algorithm, which defaults to SHA-1.


getString

private static String getString(String key)

print

private static void print(String key,
                          String val)


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.