Code example for ZipEntry

0
 
    /** 
     * {@inheritDoc} 
     */ 
    public OutputStream add(String name) throws Exception {
        ZipEntry zipEntry = new ZipEntry(name);
        outputStream.putNextEntry(zipEntry);
        return new ClosingEntryOutputStreamWrapper(outputStream);
    } 
 
    /** 
     * Closes archive handle. 
     */ 
    public void save() throws Exception {
        outputStream.close();
    } 
 
    @Override 
    public String toString() {
        return "zip: " + file;
Experience pair programming with AI  Get Codota for Java