code: public void flush() throws IOException {
          checkForClosed();
          writeBufferToFile();
          if (_currentOffset > _offset) { // something to commit
              _nfsFile.commit(_offset, (int) (_currentOffset - _offset));
              _offset = _currentOffset;
          }
          super.flush();
      }
docs: /*
  (non-Javadoc)
  
  @see java.io.OutputStream#flush()