private Map<String, String> loadChecksums(File file, int algorithm) {
        Map<String, String> checksums = new HashMap<String,String>();

        if ( file.exists() ) {
            try {
                FileInputStream fis =  new FileInputStream(file.getAbsolutePath());

                 // Get the object of DataInputStream
                DataInputStream in = new DataInputStream(fis);
                BufferedReader br = new BufferedReader(new InputStreamReader(in));
                String strLine;

                while ((strLine = br.readLine()) != null) {
                    String tokens[] = strLine.split(" ");

                    String filename = tokens[0];

                    String checksum = null;

                    switch ( algorithm ) {
                        case Constants.CHECKSUM_ALG_MD_2: break;
                        case Constants.CHECKSUM_ALG_MD_5: checksum = tokens[2];break;
                        case Constants.CHECKSUM_ALG_SHA_1: break;
                        case Constants.CHECKSUM_ALG_SHA_256: checksum = tokens[1]; break;
                        case Constants.CHECKSUM_ALG_SHA_384: break;
                        case Constants.CHECKSUM_ALG_SHA_512: break;

                        default: throw new IllegalArgumentException("Invalid checksum algorithm specified ( " + algorithm + " )");
                    }
                    checksums.put(filename, checksum);
                }
            } catch ( Exception ex ) {
                ex.printStackTrace();
            }
        } else {
            return null;
        }

        return checksums;
    }