Actually, it's not that interesting. You can't make an enum for every single command, as you read the command as plaintext.
Unless I misunderstood your post.
Also, an IF statement in java requires 8 bytes of memory, since every computer nowadays has more than 256MB (2147483648 bytes), an...