Java ZipOutputStream Create getOutputStream(File file)

Here you can find the source of getOutputStream(File file)

Description

get Output Stream

License

Open Source License

Declaration

public static ZipOutputStream getOutputStream(File file) throws FileNotFoundException 

Method Source Code

//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)));
    }
}

Related

  1. getOutputStream(File file, boolean append)
  2. getOutputStream(File tarFile)
  3. getOutputStream(String outputFileName)