if (rec.type == DNSConstants.TYPE_A) {
if ( (rec.getType() == DNSConstants.TYPE_A) || (rec.getType() == DNSConstants.TYPE_AAAA) ) {
    private void handleResponse(DNSIncoming msg) throws IOException {        long now = System.currentTimeMillis();                boolean hostConflictDetected = false;        boolean serviceConflictDetected = false;                for (Enumeration e = msg.answers.elements() ; e.hasMoreElements() ;) {            boolean isInformative = false;            DNSRecord rec = (DNSRecord)e.nextElement();            boolean expired = rec.isExpired(now);                        // update the cache            DNSRecord c = (DNSRecord)cache.get(rec);            if (c != null) {                if (expired) {                    isInformative = true;                    cache.remove(c);                } else {                    c.resetTTL(rec);                    rec = c;                }            } else {                if (!expired) {                    isInformative = true;                    cache.add(rec);                }            }            switch (rec.type) {                case DNSConstants.TYPE_PTR:                    // handle _mdns._udp records                    if (rec.name.indexOf("._mdns._udp.") >= 0) {                        if (!expired && rec.name.startsWith("_services._mdns._udp.")) {                            isInformative = true;                            registerServiceType(((DNSRecord.Pointer)rec).alias);                        }                        continue;                    }                    registerServiceType(rec.name);                    break;            }                        if (rec.type == DNSConstants.TYPE_A) {                hostConflictDetected |= rec.handleResponse(this);            } else {                serviceConflictDetected |= rec.handleResponse(this);            }                        // notify the listeners            if (isInformative) {                updateRecord(now, rec);            }        }                if (hostConflictDetected || serviceConflictDetected) {            new Prober().start();        }    }