Can a FileReader object get written twice? I just create a file using PrintWriter with a FileReader object as its argument. Result of that is a file created. Then i need to write something to that file which just created. So i create a printWriter object again with that FileReader object. But that doesnt work. Can someone help?
public void writeFile(FileReader in) throws java.io.IOException
PrintWriter out = new PrintWriter(writer);
BufferedReader inFile = new BufferedReader(in);
String line =null;
int j = 1;
while ((line = inFile.readLine())!= null)
out.println(j+ " : " + line);
so I first call
then i do:
PrintWriter err = new PrintWriter(parser.writer);
// add any error messages to the listing file...
for (int i=0; i<parser.errors.size(); i++)
String k = (String)parser.errors.get(i);
the problem is nothing being added to the file which just created.
This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…