public Attributes getAttributes() throws IOException { if (URLJarFile.this.isSuperMan()) { Map e = URLJarFile.this.superEntries; if (e != null) { Attributes a = (Attributes) e.get(getName()); if (a != null) return (Attributes) a.clone(); } } return null; }
public Manifest getManifest() throws IOException { if (!isSuperMan()) { return null; } Manifest man = new Manifest(); Attributes attr = man.getMainAttributes(); attr.putAll((Map) superAttr.clone()); // now deep copy the manifest entries if (superEntries != null) { Map entries = man.getEntries(); Iterator it = superEntries.keySet().iterator(); while (it.hasNext()) { Object key = it.next(); Attributes at = (Attributes) superEntries.get(key); entries.put(key, at.clone()); } } return man; }