Hi,
I have a problem while reading a jsp file. I have a jsp file called scan.jsp. It is a very big file having 9000 lines. It has java script codes, some imported files etc. Unable to read all lines of data when I try the following code.
public static final void startReadProcess(String sourcFile){
LineNumberReader lnr = null;
try {
lnr = new LineNumberReader (new FileReader (sourcFile));
while ((lnr.readLine ()) != null) {
System.out.println(lnr.readLine ());
}
} catch (Exception e) {
e.printStackTrace();
PrintErrorLog.printError("Error while readingSoureFile");
}
finally{
closeReaderObj(lnr);
}
}
Can any one please let me know why Data loss happing while reading big files?