FileWrite - { inFile = new BufferedReader(new...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
package lab4; p import java.io.*; public class FileWrite { p BufferedWriter outFile; public FileWrite(String outFile1) throws IOException p { outFile = new BufferedWriter(new FileWriter(outFile1)); } BufferedReader inFile; public BufferedReader readFile(String s) throws IOException
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { inFile = new BufferedReader(new FileReader(s)); return inFile; } public void close() throws IOException { outFile.close(); } public void writeToObject(String s) throws IOException { outFile.write(s); outFile.newLine(); } }...
View Full Document

Ask a homework question - tutors are online