private static byte[] computeDigest(File file) throws IOException {
  InputStream is=null;
  try {
    is=new FileInputStream(file);
    return DigestUtils.md5(is);
  }
  finally {
    if (is != null) {
      is.close();
    }
  }
}

private static byte [ ] computeDigest ( File file ) throws IOException { InputStream is = null ; try { is = new FileInputStream ( file ) ; return DigestUtils . md5 ( is ) ; } finally { if ( is != null ) { is . close ( ) ; } } }
computes and returns the message digest for the specified file .
