private ByteBuffer warpBuffer(CommandEnum commandEnum) {

		ByteBuffer requestBuffer = null;

		if (commandEnum == CommandEnum.Version) {

			requestBuffer = ByteBuffer.allocate(BinaryProtocolConst.HEADER_LEN);

			requestBuffer.put(this.getMagic()); // magic
			requestBuffer.put(this.getOpcode()); // opcode
			requestBuffer.putShort(this.getKeyLength()); // keylength
			requestBuffer.put(this.getExtrasLength()); // extraslength
			requestBuffer.put(this.getDataType()); // datatype
			requestBuffer.putShort(this.getReserved()); // reserved | VBucket
			requestBuffer.putInt(this.getTotalBodyLength()); // totalBodyLength
			requestBuffer.putInt(this.getOpaque()); // opaque
			requestBuffer.putLong(this.getCas()); // cas

		} else if (commandEnum == CommandEnum.Add) {

			requestBuffer = ByteBuffer.allocate(BinaryProtocolConst.HEADER_LEN + totalBodyLength);

			requestBuffer.put(this.getMagic()); // magic
			requestBuffer.put(this.getOpcode()); // opcode
			requestBuffer.putShort(this.getKeyLength()); // keylength
			requestBuffer.put(this.getExtrasLength()); // extraslength
			requestBuffer.put(this.getDataType()); // datatype
			requestBuffer.putShort(this.getReserved()); // reserved | VBucket
			requestBuffer.putInt(this.getTotalBodyLength()); // totalBodyLength
			requestBuffer.putInt(this.getOpaque()); // opaque
			requestBuffer.putLong(this.getCas()); // cas
			requestBuffer.putInt(this.getFlags());
			requestBuffer.putInt(this.getExpiry());
			requestBuffer.put(this.getKey());
			requestBuffer.put(this.getValue());

		} else if (commandEnum == CommandEnum.Get) {
			requestBuffer = ByteBuffer.allocate(BinaryProtocolConst.HEADER_LEN + totalBodyLength);
			requestBuffer.put(this.getMagic()); // magic
			requestBuffer.put(this.getOpcode()); // opcode
			requestBuffer.putShort(this.getKeyLength()); // keylength
			requestBuffer.put(this.getExtrasLength()); // extraslength
			requestBuffer.put(this.getDataType()); // datatype
			requestBuffer.putShort(this.getReserved()); // reserved | VBucket
			requestBuffer.putInt(this.getTotalBodyLength()); // totalBodyLength
			requestBuffer.putInt(this.getOpaque()); // opaque
			requestBuffer.putLong(this.getCas()); // cas
			requestBuffer.put(this.getKey());
		}

		requestBuffer.flip();

		return requestBuffer;

	}