Code example for ZipEntry

Methods: setComment

0
            cursor.close();
        } 
    } 
 
    private void addDummyEntry(JarOutputStream jar) throws IOException {
        ZipEntry entry = new ZipEntry(".EMPTY");
        entry.setComment("This archive file is empty.");
        jar.putNextEntry(entry);
    } 
 
    private void addEntry( 
            JarOutputStream jar,
            InputStream source,
            Location location) throws IOException {
        assert jar != null;
        assert source != null;
        assert location != null; 
        LOG.trace("Adding to jar entry: {}", location); 
        JarEntry entry = new JarEntry(location.toPath('/'));
        jar.putNextEntry(entry);