   [java] From the "outside": get current position in a File?
  Hi,this problem has a lot to do with this thread.Suppose I do have a Java program that reads in a file by using the java.io.FileReader object and its read(char [] cbuf) method.Suppose further that I do not have any access to the source of thatfile whatsoever. Can I somehow find out, how many bytes have beenread in the opened file so far?I tried to use the Java debugger and set a watchpoint to the java.nio.HeapByteBuffer (which is a ring buffer indicating -- somehow -- the current position in a file). This was quite satisfactory, though I cannot really derive the physical position in the file with it (or at least, I don''t know how).Are there better fields in the FileReader class that can be used to determine the file position? I know that tracking the read accesses would probably be a good idea: I could set a method exit breakpoint at each read access and evaluate the return value (number of bytes read).But is there any better way?(Sorry for the gibberish, I have been stuck in this problem a little too long, I suppose )Thanks very much for your help!!Beren 