Here you can find the source of getOutputStream(String file)
public static DataOutputStream getOutputStream(String file) throws IOException
//package com.java2s; import java.io.*; public class Main { /**/* ww w. j a v a 2 s. co m*/ * Return a buffered output stream stream for file. */ public static DataOutputStream getOutputStream(String file) throws IOException { return getOutputStream(new File(file)); } /** * Return a buffered output stream stream for f. */ public static DataOutputStream getOutputStream(File f) throws IOException { return new DataOutputStream(new BufferedOutputStream(new FileOutputStream(f), 32676)); } }