Here you can find the source of writeFolderEntry(ZipOutputStream zout, String relpath)
Parameter | Description |
---|---|
IOException | If an I/O error occurs while writing the entry. |
public static void writeFolderEntry(ZipOutputStream zout, String relpath) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; public class Main { /**/* ww w .j av a 2 s .c o m*/ * Writes a new folder entry to the ZIP file. * * @throws IOException If an I/O error occurs while writing the entry. */ public static void writeFolderEntry(ZipOutputStream zout, String relpath) throws IOException { if (relpath.length() > 0 && !relpath.endsWith("/")) { relpath += "/"; } ZipEntry entry = new ZipEntry(relpath); zout.putNextEntry(entry); zout.closeEntry(); } }