code: private void internalFlush(NextFilter nextFilter, IoSession session,
              IoBuffer buf) throws Exception {
          IoBuffer tmp;
          synchronized (buf) {
              buf.flip();
              tmp = buf.duplicate();
              buf.clear();
          }
          logger.debug("Flushing buffer: {}", tmp);
          nextFilter.filterWrite(session, new DefaultWriteRequest(tmp));
      }
docs: Internal method that actually flushes the buffered data.
  
  @param nextFilter the {@link NextFilter} of this filter
  @param session the session where buffer will be written
  @param buf the data to write
  @throws Exception if a write operation fails