private static Map<String, String> getFileHashMap(File apkFile) {
    	System.out.println("Getting FileHashMap for: " + apkFile.getName());
    	JarFile apkJar = null;
    	Manifest manifest = null;
    	try {
			apkJar = new JarFile(apkFile);
			manifest = apkJar.getManifest();
		} catch (IOException e) {
			System.out.println("Exception reading " + apkFile.getName());
			e.printStackTrace();
			return null;
		} catch (RuntimeException e) {
			System.out.println("Exception reading " + apkFile.getName());
			e.printStackTrace();
			return null;
		}
    	finally {
    		if (apkJar != null)
    			try {
    				apkJar.close();
    			} catch(Exception e) {}
    	}
    	
    	if (manifest == null) {
    		System.out.println("Manifest File cannot be found: " + apkFile.getName());
    		return null;
    	}
			
    	Map<String, String> fileHashMap = new HashMap<String, String>();
		HashMap<String, Attributes> map = (HashMap<String, Attributes>) manifest.getEntries();
		Iterator<Entry<String, Attributes>> it = map.entrySet().iterator();
		Entry<String, Attributes> pair;
		while (it.hasNext()) {
			pair = it.next();
			fileHashMap.put(pair.getKey().toString(), pair.getValue().getValue("SHA1-Digest"));
		}

		return fileHashMap;
    }