private void flushLeftOver(CharBuffer input) throws IOException {
  if (!_hasLeftOver) {
    return;
  }
  for (; ; ) {
    if (input != null && input.hasRemaining()) {
      _leftOverBuffer.put(input.get());
    }
    _leftOverBuffer.flip();
    CoderResult cr=_encoder.encode(_leftOverBuffer,_buffer,input == null);
    if (cr.isUnderflow()) {
      if (_leftOverBuffer.hasRemaining()) {
        _leftOverBuffer.compact();
      }
 else {
        break;
      }
    }
    if (cr.isOverflow()) {
      flushBufferToWriter();
    }
  }
  _hasLeftOver=false;
  _leftOverBuffer.clear();
}

private void flushLeftOver ( CharBuffer input ) throws IOException { if ( ! _hasLeftOver ) { return ; } for ( ; ; ) { if ( input != null && input . hasRemaining ( ) ) { _leftOverBuffer . put ( input . get ( ) ) ; } _leftOverBuffer . flip ( ) ; CoderResult cr = _encoder . encode ( _leftOverBuffer , _buffer , input == null ) ; if ( cr . isUnderflow ( ) ) { if ( _leftOverBuffer . hasRemaining ( ) ) { _leftOverBuffer . compact ( ) ; } else { break ; } } if ( cr . isOverflow ( ) ) { flushBufferToWriter ( ) ; } } _hasLeftOver = false ; _leftOverBuffer . clear ( ) ; }
flushes the left - over buffer . characters from the input buffer are used to add more data to the _leftoverbuffer in order to make the flush happen .
