I am using buffered Reader.....some problem arises ...dnt know why....am using the following code to read a big file about 8MB.
path = "/home/t.txt"
File file=new File(path);
FileReader freader=new FileReader(file );
BufferedReader reader=new BufferedReader( freader);
System.out.prin tln(reader.read y());
while((line = reader.readLine ()) != null)
{
//some code
}
in the above case it sometimes gives reader.ready() is false....and so it does not enter the while loop wat could be the fix....and why its giving reader.ready() is false
reason and wat is the fix for it...
path = "/home/t.txt"
File file=new File(path);
FileReader freader=new FileReader(file );
BufferedReader reader=new BufferedReader( freader);
System.out.prin tln(reader.read y());
while((line = reader.readLine ()) != null)
{
//some code
}
in the above case it sometimes gives reader.ready() is false....and so it does not enter the while loop wat could be the fix....and why its giving reader.ready() is false
reason and wat is the fix for it...
Comment