public static ZipOutputStream createZipOutputStream(String filePath,String zipEntryName) throws IOException {
  OutputStream os=new FileOutputStream(filePath);
  ZipOutputStream zos=new ZipOutputStream(new BufferedOutputStream(os));
  ZipEntry entry=new ZipEntry(zipEntryName);
  zos.putNextEntry(entry);
  return zos;
}

public static ZipOutputStream createZipOutputStream ( String filePath , String zipEntryName ) throws IOException { OutputStream os = new FileOutputStream ( filePath ) ; ZipOutputStream zos = new ZipOutputStream ( new BufferedOutputStream ( os ) ) ; ZipEntry entry = new ZipEntry ( zipEntryName ) ; zos . putNextEntry ( entry ) ; return zos ; }
creates a zip file an opens a single entry for writing
