public ZipFileSystem(File jarFile) throws IOException { entrySystem = new InMemoryFileSystem(); entrySystem.setFileInitialCapacity(0); entrySystem.setFileSizeIncrement(0); factory = new TFileFactory(entrySystem); load(jarFile); this.jarFile = jarFile; }
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); } }
public PathContent list(TPath path) { return entrySystem.list(path); }
public boolean dirExists(TPath path) { return entrySystem.dirExists(path); }
public boolean fileExists(TPath path) { return entrySystem.fileExists(path); }