ChannelBuffer headerBuffer = constructHeader(bcmd, extrasBuffer, keyBuffer, valueBuffer, getStatusCode(command).code, command.cmd.opaque, casUnique);
// write everything
// is the command 'quiet?' if so, then we append to our 'corked' buffer until a non-corked command comes along
if (bcmd.noreply) {
int totalCapacity = headerBuffer.capacity() + (extrasBuffer != null ? extrasBuffer.capacity() : 0)
+ (keyBuffer != null ? keyBuffer.capacity() : 0) + (valueBuffer != null ? valueBuffer.capacity() : 0);
if (corkedResponse != null) {
ChannelBuffer oldBuffer = corkedResponse;
corkedResponse = ChannelBuffers.buffer(ByteOrder.BIG_ENDIAN, totalCapacity);
corkedResponse.writeBytes(oldBuffer);