Here you can find the source of newOutputStream(File file)
public static OutputStream newOutputStream(File file)
//package com.java2s; //License from project: Apache License import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.UncheckedIOException; public class Main { public static OutputStream newOutputStream(File file) { return newFileOutputStream(file); }/*from w ww.j a va 2 s .c o m*/ public static FileOutputStream newFileOutputStream(File file) { try { return new FileOutputStream(file); } catch (IOException e) { throw new UncheckedIOException(e); } } }