salomeTMF_plug.pluginxlsxml.Import
Class Digest

java.lang.Object
  extended by salomeTMF_plug.pluginxlsxml.Import.Digest

public class Digest
extends java.lang.Object

Since:
JDK5.0
Author:
Aurore PENAULT

Constructor Summary
Digest()
           
 
Method Summary
static java.lang.String runMD5(java.io.File f)
          Compute the MD5 digest of a file from a FileInputStream
static java.lang.String runMD5(java.io.FileInputStream fis)
          Compute the MD5 digest of a file from a FileInputStream
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Digest

public Digest()
Method Detail

runMD5

public static java.lang.String runMD5(java.io.FileInputStream fis)
Compute the MD5 digest of a file from a FileInputStream

Parameters:
fis - a FileInputStream
Returns:
MD5 as a String

runMD5

public static java.lang.String runMD5(java.io.File f)
                               throws java.io.FileNotFoundException
Compute the MD5 digest of a file from a FileInputStream

Parameters:
f - file
Returns:
MD5 as a String
Throws:
java.io.FileNotFoundException - if the file does not exist, is a directory rather than a regular file, or for some other reason cannot be opened for reading.