docs: public int read() throws java.io.IOException {
      checkClosed();
      try {
        if (limit > 0 && apos >= limit) {
          return -1;
        }
        if (buffer == null || bpos >= buffer.length) {
          buffer = lo.read(bsize);
          bpos = 0;
        }
  
        // Handle EOF
        if (bpos >= buffer.length) {
          return -1;
        }
  
        int ret = (buffer[bpos] & 0x7F);
        if ((buffer[bpos] & 0x80) == 0x80) {
          ret |= 0x80;
        }
  
        bpos++;
        apos++;
  
        return ret;
      } catch (SQLException se) {
        throw new IOException(se.toString());
      }
    }