int len = is.read(buffer, 0, buffer.length); while (len > 0) { zos.write(buffer, 0, len); len = is.read(buffer, 0, buffer.length); }
try { int len = is.read(buffer, 0, buffer.length); while (len > 0) { zos.write(buffer, 0, len); len = is.read(buffer, 0, buffer.length); } } catch (EOFException e) { }
    public static void addZipEntry(ZipEntry ze, ZipOutputStream zos, InputStream is) throws IOException {	try {            zos.putNextEntry(ze);	} catch (ZipException e) {	    return;	// duplicate entry, ignored.	}        int len = is.read(buffer, 0, buffer.length);        while (len > 0) {            zos.write(buffer, 0, len);            len = is.read(buffer, 0, buffer.length);        }        zos.closeEntry();    }