public TrueZipZipFileHandle( final File targetFile ) throws IOException { super( targetFile ); this.zipFile = new ZipFile( targetFile ); }
public TrueZipZipFileHandle( final File targetFile ) throws IOException { super( targetFile ); this.zipFile = new ZipFile( targetFile ); }
public TrueZipZipFileHandle( final File targetFile ) throws IOException { super( targetFile ); this.zipFile = new ZipFile( targetFile ); }
protected ZipFile newZipFile( File file, Charset charset) throws IOException { return new ZipFile(file, charset); }
protected ZipFile newZipFile( String name, Charset charset) throws IOException { return new ZipFile(name, charset); }
protected ZipFile newZipFile( ReadOnlyFile file, Charset charset) throws IOException { return new ZipFile(file, charset); }
protected ZipFile newZipFile(ReadOnlyFile file) throws IOException { return new ZipFile(file); }
protected ZipFile newZipFile(File file) throws IOException { return new ZipFile(file); }
protected ZipFile newZipFile(String name) throws IOException { return new ZipFile(name); }
@Override protected ZipFile newZipFile(File file) throws IOException { ZipFile res = new ZipFile(file); res.setCryptoParameters(new WinZipAesCryptoParameters()); return res; }
@Override protected ZipFile newZipFile(ReadOnlyFile file) throws IOException { ZipFile res = new ZipFile(file); res.setCryptoParameters(new WinZipAesCryptoParameters()); return res; }
@Override protected ZipFile newZipFile( ReadOnlyFile file, Charset charset) throws IOException { ZipFile res = new ZipFile(file, charset); res.setCryptoParameters(new WinZipAesCryptoParameters()); return res; }
@Override protected ZipFile newZipFile( String name, Charset charset) throws IOException { ZipFile res = new ZipFile(name, charset); res.setCryptoParameters(new WinZipAesCryptoParameters()); return res; }
@Override protected ZipFile newZipFile(String name) throws IOException { ZipFile res = new ZipFile(name); res.setCryptoParameters(new WinZipAesCryptoParameters()); return res; }
@Override protected ZipFile newZipFile( File file, Charset charset) throws IOException { ZipFile res = new ZipFile(file, charset); res.setCryptoParameters(new WinZipAesCryptoParameters()); return res; }
private ZipOutputStream getZipFileOutputStream() throws IOException { String fileName = query.getId().toString(); if (query.getOffset() == null || query.getOffset() == 0l) { OutputStream stream = fileStorage.createFile(query.getUser(), fileName); return new ZipOutputStream(stream, Charsets.UTF_8); } OutputStream stream = fileStorage.appendFile(query.getUser(), fileName); // FIXME Is there any other way to append archive file? ZipFile zipFile = new ZipFile(fileStorage.readFile(query.getUser(), fileName)); return new ZipOutputStream(stream, zipFile); }
/** * {@inheritDoc} */ @Override public void handle(IdentificationRequest request) throws IOException { final ZipFile zipFile = new ZipFile(new ReaderReadOnlyFile(request.getWindowReader())); try { Iterable<ZipEntry> iterable = new Iterable<ZipEntry>() { @Override public final Iterator<ZipEntry> iterator() { return new ZipFileIterator(zipFile); } }; ZipArchiveWalker walker = new ZipArchiveWalker(request.getIdentifier(), zipFile); walker.walk(iterable); } finally { if (zipFile != null) { zipFile.close(); } } }
/** * {@inheritDoc} */ @Override public void handle(IdentificationRequest request) throws IOException { final ZipFile zipFile = new ZipFile(new TrueZipReader(request.getWindowReader())); try { Iterable<ZipEntry> iterable = new Iterable<ZipEntry>() { @Override public final Iterator<ZipEntry> iterator() { return new ZipFileIterator(zipFile); } }; ZipArchiveWalker walker = new ZipArchiveWalker(request.getIdentifier(), zipFile); walker.walk(iterable); } finally { if (zipFile != null) { zipFile.close(); } } }
@Override public void process(IdentificationRequest request, ContainerSignatureMatchCollection matches) throws IOException { ZipFile zipFile = new ZipFile(new TrueZipReader(request.getWindowReader()), ZipFile.DEFAULT_CHARSET, true, false); try {
@Override public void process(IdentificationRequest request, ContainerSignatureMatchCollection matches) throws IOException { ZipFile zipFile = new ZipFile(new ReaderReadOnlyFile(request.getWindowReader()), ZipFile.DEFAULT_CHARSET, true, false); try {