code: public void flush() throws IOException {
      checkClosed();
      try {
        if (bpos > 0) {
          lo.write(buf, 0, bpos);
        }
        bpos = 0;
      } catch (SQLException se) {
        throw new IOException(se.toString());
      }
    }
docs: Flushes this output stream and forces any buffered output bytes to be written out. The general
  contract of <code>flush</code> is that calling it is an indication that, if any bytes
  previously written have been buffered by the implementation of the output stream, such bytes
  should immediately be written to their intended destination.
  
  @throws IOException if an I/O error occurs.