它的possibe使用RandomAccessFile ..试试这个..
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
public class RandomFileAccessExample
{
RandomFileAccessExample() throws IOException
{
RandomAccessFile file = new RandomAccessFile("someTxtFile.txt", "r");
System.out.println(file.getFilePointer());
file.readLine();
System.out.println(file.getFilePointer());
}
public static void main(String[] args) throws IOException {
new RandomFileAccessExample();
}
}