/** * Returns the manifest value for the specified key. * * @param key key * @return value or {@code null} */ public static Object get(final String key) { if (MAP != null) { for (final Object o : MAP.keySet()) { if (key.equals(o.toString())) return MAP.get(o); } } return null; }
private static Hashtable<String, String> getManifestAttributes(Manifest manifest) { Hashtable<String, String> h = new Hashtable<String, String>(); try { Attributes attrs = manifest.getMainAttributes(); Iterator it = attrs.keySet().iterator(); while (it.hasNext()) { String key = it.next().toString(); h.put(key, attrs.getValue(key)); } } catch (Exception ignore) { } return h; }