code: public static OutputStream asBufferedOutputStream(File file) throws IOException {
          return asBufferedOutputStream(Files.newOutputStream(file.toPath()));
      }
docs: Returns an output stream that writes the contents to the given file. Additionally buffers the input stream to
  improve performance.
  
  @param file
  the file to write to
  
  @return a (buffered) output stream for the file contents.
  
  @throws IOException
  if accessing the file results in an I/O error.