View Single Post
  #2 (permalink)  
Old 11-17-2007, 12:58 AM
ShoeNinja's Avatar
ShoeNinja ShoeNinja is offline
Senior Member
 
Join Date: Oct 2007
Posts: 123
ShoeNinja is on a distinguished road
Send a message via AIM to ShoeNinja
Here's one of the constructors for my class:

Code:
public FileBrowser(File readIt){ try{ this.f = readIt; this.fr = new FileReader(f); this.br = new BufferedReader(fr); br.mark((int)f.length() * 10); }catch (Exception e){ System.out.println("Problem creating FileBrowser " + e.toString()); } }
The problem is with the mark method. The int passed to it is the number of bytes the BufferedReader can read before it loses the mark. Since I have methods that jump all over the file, the BufferedReader eventually exceeds this number and throws an an exception. Anybody have any experience with this?
Reply With Quote