Here you can find the source of getOutputStream(File file, String filePath)
Parameter | Description |
---|---|
file | a parameter |
filePath | a parameter |
public static OutputStream getOutputStream(File file, String filePath)
//package com.java2s; /*/*from w ww.j av a 2 s . c o m*/ * $RCSfile: FileUtil,v $$ * $Revision: 1.0 $ * $Date: 2011 $ * * Copyright (C) 2011 GyTech, Inc. All rights reserved. * * This software is the proprietary information of GyTech, Inc. * Use is subject to license terms. */ import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.OutputStream; public class Main { /** * @param file * @param filePath * @return OutputStream */ public static OutputStream getOutputStream(File file, String filePath) { try { return new FileOutputStream(filePath + "/" + file.getName()); } catch (FileNotFoundException e) { e.printStackTrace(); } return null; } }