Esempio n. 1
0
 private void processMetaInfEntry(AsciiBytes name, JarEntryData entry) {
   if (name.equals(MANIFEST_MF)) {
     this.manifestEntry = entry;
   }
   if (name.endsWith(SIGNATURE_FILE_EXTENSION)) {
     this.signed = true;
   }
 }
Esempio n. 2
0
  public JarEntryData getJarEntryData(AsciiBytes name) {
    if (name == null) {
      return null;
    }
    Map<AsciiBytes, JarEntryData> entriesByName =
        (this.entriesByName == null ? null : this.entriesByName.get());
    if (entriesByName == null) {
      entriesByName = new HashMap<AsciiBytes, JarEntryData>();
      for (JarEntryData entry : this.entries) {
        entriesByName.put(entry.getName(), entry);
      }
      this.entriesByName = new SoftReference<Map<AsciiBytes, JarEntryData>>(entriesByName);
    }

    JarEntryData entryData = entriesByName.get(name);
    if (entryData == null && !name.endsWith(SLASH)) {
      entryData = entriesByName.get(name.append(SLASH));
    }
    return entryData;
  }