docs: public static MessageType deserializeHeader(final ByteBuf buf) {
  
  		// checking the version
  		int version = buf.readInt();
  		Preconditions.checkState(version == VERSION,
  				"Version Mismatch:  Found " + version + ", Expected: " + VERSION + '.');
  
  		// fetching the message type
  		int msgType = buf.readInt();
  		MessageType[] values = MessageType.values();
  		Preconditions.checkState(msgType >= 0 && msgType < values.length,
  				"Illegal message type with index " + msgType + '.');
  		return values[msgType];
  	}