Java FileOutputStream Create getOutputStream(final File file)

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

Description

get Output Stream

License

Open Source License

Declaration

public static FileOutputStream getOutputStream(final File file) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.File;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;

public class Main {
    public static FileOutputStream getOutputStream(final File file) {
        try {//from  w  ww .ja v  a 2  s  . c om
            return new FileOutputStream(file);
        } catch (FileNotFoundException e) {
            return null;
        }
    }

    public static FileOutputStream getOutputStream(final String path) {
        return getOutputStream(getFile(path));
    }

    public static File getFile(final String path) {
        return new File(path);
    }
}

Related

  1. getOutputStream(File file)
  2. getOutputStream(File file)
  3. getOutputStream(File file, String filePath)
  4. getOutputStream(final File file)
  5. getOutputStream(final Object obj, final boolean append)
  6. getOutputStream(String file)
  7. getOutputStream(String filename)
  8. getOutputStream(String fileName)