org.dcm4che.util
Class MD5Utils

java.lang.Object
  extended by org.dcm4che.util.MD5Utils

public class MD5Utils
extends java.lang.Object

Since:
28.06.2004
Version:
$Revision: 3988 $ $Date: 2006-05-08 16:21:15 +0200 (Mo, 08 Mai 2006) $
Author:
gunter.zeilinger@tiani.com

Field Summary
static long GIGA
           
static long MEGA
           
 
Method Summary
static java.lang.String formatSize(long size)
           
static java.io.File makeMD5File(java.io.File f)
           
static void md5sum(java.io.File f, char[] cbuf, java.security.MessageDigest digest, byte[] bbuf)
           
static byte[] md5sum(java.io.File dst, java.security.MessageDigest digest, byte[] buf)
           
static long parseSize(java.lang.String s, long minSize)
           
static byte[] toBytes(char[] cbuf)
           
static void toBytes(char[] cbuf, byte[] bs)
           
static byte[] toBytes(java.lang.String s)
           
static char[] toHexChars(byte[] bs)
           
static void toHexChars(byte[] bs, byte[] cbuf, int off)
           
static void toHexChars(byte[] bs, char[] cbuf)
           
static boolean verify(java.io.File driveDir, java.io.File fsDir)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MEGA

public static final long MEGA
See Also:
Constant Field Values

GIGA

public static final long GIGA
See Also:
Constant Field Values
Method Detail

makeMD5File

public static java.io.File makeMD5File(java.io.File f)

toHexChars

public static char[] toHexChars(byte[] bs)

toHexChars

public static void toHexChars(byte[] bs,
                              char[] cbuf)

toHexChars

public static void toHexChars(byte[] bs,
                              byte[] cbuf,
                              int off)

toBytes

public static void toBytes(char[] cbuf,
                           byte[] bs)

toBytes

public static byte[] toBytes(char[] cbuf)

toBytes

public static byte[] toBytes(java.lang.String s)

md5sum

public static void md5sum(java.io.File f,
                          char[] cbuf,
                          java.security.MessageDigest digest,
                          byte[] bbuf)
                   throws java.io.IOException
Throws:
java.io.IOException

md5sum

public static byte[] md5sum(java.io.File dst,
                            java.security.MessageDigest digest,
                            byte[] buf)
                     throws java.io.IOException
Throws:
java.io.IOException

verify

public static boolean verify(java.io.File driveDir,
                             java.io.File fsDir)
                      throws java.io.IOException
Throws:
java.io.IOException

formatSize

public static java.lang.String formatSize(long size)

parseSize

public static long parseSize(java.lang.String s,
                             long minSize)