previous |
start |
next
RandomAccessFile
- To open a random-access file for reading and writing
-
RandomAccessFile f = new
RandomAcessFile("bank.dat","rw");
- To move the file pointer to a specific byte
-
f.seek(n);
- To get the current position of the file pointer.
-
long n = f.getFilePointer();
- To find the number of bytes in a file
-
long fileLength = f.length();
previous |
start |
next