Help! Extra one line space in text file?
halo, i am doing a program to download a created text file into pc... the download program is just retrieve records from database and write it into a text file... then i will pass that created text file name to another program, then it will prompt out the window message dialog box to allow user to save or to open the text file....
now i want to know what will cause one extra line at the top of the downloaded text file?
Here is my coding, assume the file name is file1...
response.setContentType("text");
response.setHeader("Content-Disposition","attachment;filename=" + file2);
int Read1;FileInputStream stream1 = null;try {File f = new File("c:/mysql/data/mrs/download/" + file2);
stream1 = new FileInputStream(f);while ((Read1 = stream1.read()) != -1){out.write(Read1);}//end whileout.flush();}//end try
finally {if (stream1 == null){stream1.close();
}//end if
}//end finally

