private void writePartsTo(Iterator<Part> parts, OutputStream os) throws IOException {
ZipOutputStream zos = new ZipOutputStream(os);
while (parts.hasNext()) {
Part part = parts.next();
prepareEntry(part, zos);
part.copy(zos);
zos.closeEntry();
}
zos.close();
}