code: @Override
      public void flush() {
  
          if (count == 0) {
              return;
          }
  
          byte[] theBytes = new byte[count];
          System.arraycopy(buf, 0, theBytes, 0, count);
          logMessageAccordingToLogLevelFilter(theBytes);
          reset();
      }
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.