package jet.util; import java.io.*; // written by zhangk public interface RandomAccessable{ /** * Sets the offset from the beginning at which the next * read or write occurs. * * @param pos the absolute position. * @exception IOException if an I/O error occurs. */ public void seek(long pos) throws IOException; /** * Returns the current offset * * @return the offset from the beginning, in bytes, * at which the next read or write occurs. * @exception IOException if an I/O error occurs. */ public long getPosition() throws IOException; /** * Skips exactly n bytes of input from current pos to pos+n. * return to skip * @param n the number of bytes to be skipped. * @return the number of bytes skipped, which is always n. * @exception EOFException if this file reaches the end before skipping * all the bytes. * @exception IOException if an I/O error occurs. */ public int skipBytes(int n) throws IOException; /** * Returns the length * * @return the length * @exception IOException if an I/O error occurs. */ public long length()throws IOException; }