Here you can find the source of getOutputStream(File file)
public static ZipOutputStream getOutputStream(File file) throws FileNotFoundException
//package com.java2s; /******************************************************************************* * Copyright (c) 2000, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html * /*ww w. j a v a 2 s . c om*/ * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ import java.io.BufferedOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.util.zip.ZipOutputStream; public class Main { public static ZipOutputStream getOutputStream(File file) throws FileNotFoundException { return new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(file))); } }