示例#1
0
 public ZipFileSystem(File jarFile) throws IOException {
   entrySystem = new InMemoryFileSystem();
   entrySystem.setFileInitialCapacity(0);
   entrySystem.setFileSizeIncrement(0);
   factory = new TFileFactory(entrySystem);
   load(jarFile);
   this.jarFile = jarFile;
 }
示例#2
0
 public InputStream createInputStream(TPath path) throws TIoException {
   if (!entrySystem.fileExists(path)) {
     throw new TFileNotFoundException(path);
   }
   ZipEntry entry = entry(path);
   try {
     return file.getInputStream(entry);
   } catch (IOException e) {
     throw new TIoException(path, "Error opening entry", e);
   }
 }
示例#3
0
 public PathContent list(TPath path) {
   return entrySystem.list(path);
 }
示例#4
0
 public boolean dirExists(TPath path) {
   return entrySystem.dirExists(path);
 }
示例#5
0
 public boolean fileExists(TPath path) {
   return entrySystem.fileExists(path);
 }