example RandomAccessFile
Example 1: RandomAccessFile
RandomAccessFile randomAccessFile = new RandomAccessFile("data/data.txt", "r");
byte[] dest = new byte[1024];
int offset = 0;
int length = 1024;
int bytesRead = randomAccessFile.read(dest, offset, length);
Example 2: RandomAccessFile
RandomAccessFile file = new RandomAccessFile("c:\\data\\file.txt", "rw");
file.write(65); // ASCII code for A