/** * Overwrite clone. * @return a cloned copy of this ZipArchiveEntry */ @Override public Object clone() { final ZipArchiveEntry e = (ZipArchiveEntry) super.clone(); e.setInternalAttributes(getInternalAttributes()); e.setExternalAttributes(getExternalAttributes()); e.setExtraFields(getAllExtraFieldsNoCopy()); return e; }
/** * Overwrite clone. * @return a cloned copy of this ZipEntry * @since 1.1 */ @Override public Object clone() { ZipEntry e = (ZipEntry) super.clone(); e.setInternalAttributes(getInternalAttributes()); e.setExternalAttributes(getExternalAttributes()); e.setExtraFields(getExtraFields(true)); return e; }
/** * Overwrite clone. * * @return a cloned copy of this ZipEntry * @since 1.1 */ @Override public Object clone() { final ZipEntry e = (ZipEntry) super.clone(); e.setInternalAttributes(getInternalAttributes()); e.setExternalAttributes(getExternalAttributes()); e.setExtraFields(getAllExtraFieldsNoCopy()); return e; }
public void updateFile(Path outputPath, List<T.V3<String, byte[], ZipEntry>> files) { try (ZipOutputStream zipFile = new ZipOutputStream(new FileOutputStream(outputPath.toFile()))) { for (V3<String, byte[], ZipEntry> v : files) { ZipEntry zipEntry = (ZipEntry)v.getC().clone(); zipEntry.setCompressedSize(-1); zipEntry.setSize(v.getB().length); zipFile.putNextEntry(zipEntry); zipFile.write(v.getB()); } } catch (IOException e) { throw new RuntimeException("Cannot store zip file ("+outputPath+")" + e.getMessage(), e); } } public static Comparator<? super V2<String, byte[]>> fileListComparator() {
/** * Overwrite clone. * @return a cloned copy of this ZipArchiveEntry */ @Override public Object clone() { final ZipArchiveEntry e = (ZipArchiveEntry) super.clone(); e.setInternalAttributes(getInternalAttributes()); e.setExternalAttributes(getExternalAttributes()); e.setExtraFields(getAllExtraFieldsNoCopy()); return e; }
/** * Overwrite clone. * @return a cloned copy of this ZipArchiveEntry */ @Override public Object clone() { final ZipArchiveEntry e = (ZipArchiveEntry) super.clone(); e.setInternalAttributes(getInternalAttributes()); e.setExternalAttributes(getExternalAttributes()); e.setExtraFields(getAllExtraFieldsNoCopy()); return e; }
/** * Overwrite clone. * * @return a cloned copy of this ZipArchiveEntry */ @Override public Object clone() { ZipArchiveEntry e = (ZipArchiveEntry) super.clone(); e.setInternalAttributes(getInternalAttributes()); e.setExternalAttributes(getExternalAttributes()); e.setExtraFields(getExtraFields(true)); return e; }