Exemple #1
0
 /**
  * Private constructor used to create a new {@link JarFile} either directly or from a nested
  * entry.
  *
  * @param rootFile the root jar file
  * @param pathFromRoot the name of this file
  * @param data the underlying data
  * @throws IOException
  */
 private JarFile(RandomAccessDataFile rootFile, String pathFromRoot, RandomAccessData data)
     throws IOException {
   super(rootFile.getFile());
   CentralDirectoryEndRecord endRecord = new CentralDirectoryEndRecord(data);
   this.rootFile = rootFile;
   this.pathFromRoot = pathFromRoot;
   this.data = getArchiveData(endRecord, data);
   this.entries = loadJarEntries(endRecord);
 }
Exemple #2
0
 private JarFile(
     RandomAccessDataFile rootFile,
     String pathFromRoot,
     RandomAccessData data,
     List<JarEntryData> entries,
     JarEntryFilter... filters)
     throws IOException {
   super(rootFile.getFile());
   this.rootFile = rootFile;
   this.pathFromRoot = pathFromRoot;
   this.data = data;
   this.entries = filterEntries(entries, filters);
 }