public static DHCPOption newOptionAsInetAddress(byte code, InetAddress val) {
    	if ((!isOptionAsInetAddr(code)) &&
    		(!isOptionAsInetAddrs(code))) {
            throw new IllegalArgumentException("DHCP option type ("+code+") is not InetAddress");
        }
        return new DHCPOption(code, inetAddress2Bytes(val));
    }