code: void flushBuffer() throws IOException {
          synchronized (lock) {
              ensureOpen();
              if (nextChar == 0)
                  return;
              out.write(cb, 0, nextChar);
              nextChar = 0;
          }
      }
docs: Flushes the output buffer to the underlying character stream, without
  flushing the stream itself.  This method is non-private only so that it
  may be invoked by PrintStream.