protected static String getCheckSum(File file) {
        MessageDigest messageDigest;
        try {
            messageDigest = MessageDigest.getInstance("MD5");
        } catch (NoSuchAlgorithmException e) {
            throw new InternalError("MD5 not supported!");
        }
        FileInputStream fis;
        try {
            fis = new FileInputStream(file);
        } catch (FileNotFoundException e) {
            return null;
        }
        byte[] buffer = new byte[65535];
        try {
            int i;
            while ((i = fis.read(buffer)) > 0)
                messageDigest.update(buffer, 0, i);
        } catch (Exception e) {
            return null;
        } finally {
            try {
                fis.close();
            } catch (IOException ignored) {
            }
        }
        return String.format("%1$032x", new BigInteger(1, messageDigest.digest()));
    }