I am trying to read a file (currently using only simulator) using Blackberry File API. I created a FileInputStream object and LineReader object to read line by line. I am not able to read more than (approx)120 bytes. This is the code I am using to test .
Any help?
Thanks
Mouli.
--------------------
Code:
FileInputStream fis = new FileInputStream(fs,filename);
LineReader lr = new LineReader(fis);
byte[] b;
try {
b = lr.readLine();
String s;
while(b.length > 0) {
s = new String(b);
System.out.println("line read : " + s);
b = lr.readLine();
}
}
catch(EOFException eof) {
//eof file reached.
eof.printStackTrace();
System.out.println("eofexception " + eof.getMessage());
}
---------------