List of usage examples for org.apache.commons.compress.archivers.jar JarArchiveEntry setComment
public void setComment(String comment)
From source file:org.springframework.boot.loader.tools.JarWriter.java
private EntryWriter addUnpackCommentIfNecessary(JarArchiveEntry entry, EntryWriter entryWriter, UnpackHandler unpackHandler) throws IOException { if (entryWriter == null || !unpackHandler.requiresUnpack(entry.getName())) { return entryWriter; }/*from w w w. j a v a2s .c o m*/ ByteArrayOutputStream output = new ByteArrayOutputStream(); entryWriter.write(output); entry.setComment("UNPACK:" + unpackHandler.sha1Hash(entry.getName())); return new InputStreamEntryWriter(new ByteArrayInputStream(output.toByteArray()), true); }