public static BufferedWriter createWriter(File file, boolean append) throws IOException {
        createDirectory(file.getAbsolutePath());
        return new BufferedWriter(new FileWriter(file, append));
    }
Creates a buffered writer in the default encoding

@param file the file to write to
@param append whether to append to the files if it exists
vespajlib/src/main/java/com/yahoo/io/IOUtils.java