Hi, Can anybody tell me how to move to the BOF when my file pointer is at the EOF. Is closing the stream and reopening it is the only way. I tried working with seek(file.length()*-1) but negative seek exception is thrown. Anybody will help me out in this.
posted 16 years ago
Hi, With RandomAccessFile the seek position is ALWAYS relative to the beginning of file so seek(0) will put the pointer on the first byte.