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;
  }