addr = ((DNSRecord.Address)rec).getInetAddress();
addr = ((DNSRecord.Address)rec).getAddress();
    public void updateRecord(JmDNS jmdns, long now, DNSRecord rec) {        if ((rec != null) && !rec.isExpired(now)) {            switch (rec.type) {                case DNSConstants.TYPE_A:                    if (rec.name.equals(server)) {                        addr = ((DNSRecord.Address)rec).getInetAddress();                                            }                    break;                case DNSConstants.TYPE_SRV:                    if (rec.name.equals(getQualifiedName())) {                        DNSRecord.Service srv = (DNSRecord.Service)rec;                        server = srv.server;                        port = srv.port;                        weight = srv.weight;                        priority = srv.priority;                        addr = null;                        // changed to use getCache() instead - jeffs                        // updateRecord(jmdns, now, (DNSRecord)jmdns.cache.get(server, TYPE_A, CLASS_IN));                        updateRecord(jmdns, now, (DNSRecord)jmdns.getCache().get(server, DNSConstants.TYPE_A, DNSConstants.CLASS_IN));                    }                    break;                case DNSConstants.TYPE_TXT:                    if (rec.name.equals(getQualifiedName())) {                        DNSRecord.Text txt = (DNSRecord.Text)rec;                        text = txt.text;                    }                    break;            }            // Future Design Pattern            // This is done, to notify the wait loop in method            // JmDNS.getServiceInfo(type, name, timeout);            if (hasData() && dns != null) {                dns.handleServiceResolved(this);                dns = null;            }            synchronized (this) { notifyAll(); }        }    }