code: protected void prepForWrite(SelectionKey selectionKey) {
          if(logger.isTraceEnabled())
              traceInputBufferState("About to clear read buffer");
  
          if(requestHandlerFactory.shareReadWriteBuffer() == false) {
              inputStream.clear();
          }
  
          if(logger.isTraceEnabled())
              traceInputBufferState("Cleared read buffer");
  
          outputStream.getBuffer().flip();
          selectionKey.interestOps(SelectionKey.OP_WRITE);
      }
docs: Flips the output buffer, and lets the Selector know we're ready to write.
  
  @param selectionKey