code: protected void flushData()
      {
          try
          {
              out.write(buffer, 0, validBufferBytes);
              lastFlushOffset += validBufferBytes;
          }
          catch (IOException e)
          {
              throw new FSWriteError(e, getPath());
          }
          if (runPostFlush != null)
              runPostFlush.run();
      }
docs: Override this method instead of overriding flush()
  @throws FSWriteError on any I/O error.