Code example for ZipEntry

0
  public void binaryExport(String group, String id, String url, OutputStream out) throws IOException {
    String src = getSource(group, id, url);
    ZipOutputStream zos = new ZipOutputStream(out);
    zos.putNextEntry(new ZipEntry(id + ".py"));
    zos.write(src.getBytes("utf-8"));
    zos.putNextEntry(new ZipEntry(id + ".csv"));
    zos.write(ExporterEngine.exportCda(group, id, "csv").getBytes("utf-8"));
    zos.close();
  } 
}