Code example for RandomAccessFile

Methods: getFilePointer, length, seek

0
	 * <p>This method supports a non-standard extension where negative numbers 
	 * 		can be used to &quot;rewind&quot; and allow characters to be re-read.</p> 
	 */ 
	@Override 
	public long skip(long n) throws IOException{
		n = Math.min(raf.length() - raf.getFilePointer(), n);
		n = Math.max(-raf.getFilePointer(), n);
		raf.seek(raf.getFilePointer() + n);
		return n;
	} 
	 
	@Override 
	public void close() throws IOException{ 
		raf.close();
	} 
	 
}