Code example for RandomAccessFile

Methods: getFilePointerlengthseek

	 * <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> 
	public long skip(long n) throws IOException{
		n = Math.min(raf.length() - raf.getFilePointer(), n);
		n = Math.max(-raf.getFilePointer(), n); + n);
		return n;
	public void close() throws IOException{ 
Experience pair programming with AI  Get Codota for Java