I have a Java program where I use BufferedWriter to output to a File line by line (bw.write("mystring" + "\n"). Then, I use a BufferedReader to read that file line by line (br.readLine()).
I want to rewrite my program to eliminate the need to write to / read from an external file. Would would I use? BufferedOutputStream? Some sample code would be appreciated.