final ChannelBuffer buffer = bufferFactory.getBuffer(readBytes);
buffer.setBytes(0, byteBuffer);
buffer.writerIndex(readBytes);
// Update the predictor.
predictor.previousReceiveBufferSize(readBytes);
// Notify the interested parties about the newly arrived message.
fireMessageReceived(
channel, buffer, remoteAddress);
}