public void wake() throws IOException {

        if (ipStr == null && inetAddress == null) {
            throw new IllegalArgumentException("You must declare ip address or supply an inetaddress");
        }

        if (macStr == null) {
            throw new NullPointerException("You did not supply a mac address with withMac(...)");
        }

        if (ipStr != null) {
            sendWakeOnLan(ipStr, macStr, port, timeoutMillis, noPackets);
        } else {
            sendWakeOnLan(inetAddress, macStr, port, timeoutMillis, noPackets);
        }
    }
Synchronous call of the wake method. Note that this is a network request and should not be
performed on the UI thread

@throws IOException - Thrown from socket errors
library/src/main/java/com/stealthcopter/networktools/WakeOnLan.java