System.out.println("DNSOutgoing writeName failed val="+val+" name="+name);
logger.log(Level.WARNING, "DNSOutgoing writeName failed val="+val+" name="+name);
    void writeName(String name) throws IOException {        while (true) {            int n = name.indexOf('.');            if (n < 0) {                n = name.length();            }            if (n <= 0) {                writeByte(0);                return;            }            Integer offset = (Integer)names.get(name);            if (offset != null) {                int val = offset.intValue();                                if (val > off) {                    System.out.println("DNSOutgoing writeName failed val="+val+" name="+name);                }                                writeByte((val >> 8) | 0xC0);                writeByte(val);                return;            }            names.put(name, new Integer(off));            writeUTF(name, 0, n);            name = name.substring(n);            if (name.startsWith(".")) {                name = name.substring(1);            }        }    }