The best way of ensuring that you don't get infected with something like this, in the absence of an effective vaccine, would be isolation,