| seek() | ใช้ เลื่อน pointer ไปยังตำแหน่งที่กำหนดใน file |
|---|
method:seek ( long_position );
return type:void
content:ใช้ เลื่อน pointer ไปยังตำแหน่งที่กำหนดใน file
example:String path_file = new String ( "C:/bamboo.txt" ); RandomAccessFile random_access_file = new RandomAccessFile ( path_file, "r" ); long size_file = random_access_file.length (); random_access_file.seek ( size_file / 2 );