/** Return the current offset from the start of the file */ public long getPos() throws IOException { return fosInputStream.tell(); }
public int read() throws IOException { byte[] b = new byte[1]; int len = fosInputStream.read(b, 0, 1); int ret = (len == -1) ? -1 : b[0] & 0xFF; return ret; }
/** * Seek to the given offset from the start of the file. The next read() will be from that * location. Can't seek past the end of the file. */ public void seek(long pos) throws IOException { fosInputStream.seek(pos); }