Пример #1
0
 /** Return the current offset from the start of the file */
 public long getPos() throws IOException {
   return fosInputStream.tell();
 }
Пример #2
0
 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;
 }
Пример #3
0
 /**
  * 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);
 }