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?