code: @Override
    public int read(byte []buf, int offset, int length)
      throws IOException
    {
      if (buf == null)
        throw new NullPointerException();
      else if (offset < 0 || buf.length < offset + length)
        throw new ArrayIndexOutOfBoundsException();
  
      int result = nativeRead(_fd, buf, offset, length);
  
      if (result > 0)
        _pos += result;
  
      return result;
    }
docs: Reads data from the file.