RandomAccessFile randomAccessFile = new RandomAccessFile (argv [0], "r");
randomAccessFile.seek (1000);
FileChannel fileChannel = randomAccessFile.getChannel();
// This will print "1000"
System.out.println ("file pos: " + fileChannel.position());
randomAccessFile.seek (500);
// This will print "500"
System.out.println ("file pos: " + fileChannel.position());
fileChannel.position (200);
// This will print "200"
System.out.println ("file pos: " + randomAccessFile.getFilePointer());