List of usage examples for org.apache.commons.compress.archivers.jar JarArchiveEntry setCompressedSize
public void setCompressedSize(long csize)
From source file:org.springframework.boot.loader.tools.JarWriter.java
private void setUpEntry(JarFile jarFile, JarArchiveEntry entry) throws IOException { try (ZipHeaderPeekInputStream inputStream = new ZipHeaderPeekInputStream(jarFile.getInputStream(entry))) { if (inputStream.hasZipHeader() && entry.getMethod() != ZipEntry.STORED) { new CrcAndSize(inputStream).setupStoredEntry(entry); } else {// w ww . j a v a 2 s. co m entry.setCompressedSize(-1); } } }