private void validatePort(int port) {
        if (port < 1) throw new IllegalArgumentException("Start port cannot be less than 1");
        if (port > 65535) throw new IllegalArgumentException("Start cannot be greater than 65535");
    }
Checks and throws exception if port is not valid

@param port - the port to validate
library/src/main/java/com/stealthcopter/networktools/PortScan.java