serialize
Method to serialize the given command into a ByteArray. The serialization logic needs to be in sync with the de-serialization logic in the parseCommand method.
Method to serialize the given command into a ByteArray. The serialization logic needs to be in sync with the de-serialization logic in the parseCommand method.