code: protected void flushIfPossible() throws IOException {
  
          // TODO: do not flush if wasn't requested by underlying application
          if (null != bufferedServletOutputStream) bufferedServletOutputStream.setLastChunk();
  
          if (null != writer) writer.flushIfOpen();
          else if (null != outputStream) outputStream.flushIfOpen();
          else {
              if (!isCommitted()) {
                  notifyBeforeCommit();
              }
              notifyBeforeClose();
          }
      }
docs: Flush the sniffer buffer and append the information about the executed queries to the output stream
  @throws IOException