@Override protected void toString(final StringBuilder sb) { super.toString(sb); sb.append(" address: '") .append(this.getAddress() != null ? this.getAddress().getHostAddress() : "null") .append('\''); }
/** * Creates a byte array representation of this record. This is needed for tie-break tests according to draft-cheshire-dnsext-multicastdns-04.txt chapter 9.2. */ @Override protected void toByteArray(DataOutputStream dout) throws IOException { super.toByteArray(dout); byte[] buffer = this.getAddress().getAddress(); for (int i = 0; i < buffer.length; i++) { dout.writeByte(buffer[i]); } }
/** * Creates a byte array representation of this record. This is needed for tie-break tests according to draft-cheshire-dnsext-multicastdns-04.txt chapter 9.2. */ @Override protected void toByteArray(DataOutputStream dout) throws IOException { super.toByteArray(dout); byte[] buffer = this.getAddress().getAddress(); for (int i = 0; i < buffer.length; i++) { dout.writeByte(buffer[i]); } }
case TYPE_A: // IPv4 if (rec.getName().equalsIgnoreCase(this.getServer())) { _ipv4Addresses.add((Inet4Address) ((DNSRecord.Address) rec).getAddress()); serviceUpdated = true; case TYPE_AAAA: // IPv6 if (rec.getName().equalsIgnoreCase(this.getServer())) { _ipv6Addresses.add((Inet6Address) ((DNSRecord.Address) rec).getAddress()); serviceUpdated = true;
case TYPE_A: // IPv4 if (rec.getName().equalsIgnoreCase(this.getServer())) { _ipv4Addresses.add((Inet4Address) ((DNSRecord.Address) rec).getAddress()); serviceUpdated = true; case TYPE_AAAA: // IPv6 if (rec.getName().equalsIgnoreCase(this.getServer())) { _ipv6Addresses.add((Inet6Address) ((DNSRecord.Address) rec).getAddress()); serviceUpdated = true;
if (record.getName().equalsIgnoreCase(this.getServer())) { final DNSRecord.Address address = (DNSRecord.Address) record; if (address.getAddress() instanceof Inet4Address) { final Inet4Address inet4Address = (Inet4Address) address.getAddress(); if(_ipv4Addresses.add(inet4Address)) { serviceUpdated = true; if (record.getName().equalsIgnoreCase(this.getServer())) { final DNSRecord.Address address = (DNSRecord.Address) record; if (address.getAddress() instanceof Inet6Address) { final Inet6Address inet6Address = (Inet6Address) address.getAddress(); if(_ipv6Addresses.add(inet6Address)) { serviceUpdated = true;
case TYPE_A: // IPv4 if (rec.getName().equalsIgnoreCase(this.getServer())) { _ipv4Addresses.add((Inet4Address) ((DNSRecord.Address) rec).getAddress()); serviceUpdated = true; case TYPE_AAAA: // IPv6 if (rec.getName().equalsIgnoreCase(this.getServer())) { _ipv6Addresses.add((Inet6Address) ((DNSRecord.Address) rec).getAddress()); serviceUpdated = true;
final Inet4Address inet4Address = (Inet4Address) address.getAddress(); final Inet6Address inet6Address = (Inet6Address) address.getAddress();
@Override boolean sameValue(DNSRecord other) { try { if (!(other instanceof Address)) { return false; } Address address = (Address) other; if ((this.getAddress() == null) && (address.getAddress() != null)) { return false; } return this.getAddress().equals(address.getAddress()); } catch (Exception e) { logger1.info("Failed to compare addresses of DNSRecords", e); return false; } }
@Override boolean sameValue(DNSRecord other) { return this.getAddress().equals(((Address) other).getAddress()); }
@Override boolean sameValue(DNSRecord other) { if (! (other instanceof Address) ) { return false; } Address address = (Address) other; if ((this.getAddress() == null) && (address.getAddress() != null)) { return false; } return this.getAddress().equals(address.getAddress()); }
@Override protected void toString(StringBuilder aLog) { super.toString(aLog); aLog.append(" address: '" + (this.getAddress() != null ? this.getAddress().getHostAddress() : "null") + "'"); }
/** * Creates a byte array representation of this record. This is needed for tie-break tests according to draft-cheshire-dnsext-multicastdns-04.txt chapter 9.2. */ @Override protected void toByteArray(DataOutputStream dout) throws IOException { super.toByteArray(dout); byte[] buffer = this.getAddress().getAddress(); for (int i = 0; i < buffer.length; i++) { dout.writeByte(buffer[i]); } }
/** * Creates a byte array representation of this record. This is needed for tie-break tests according to draft-cheshire-dnsext-multicastdns-04.txt chapter 9.2. */ @Override protected void toByteArray(DataOutputStream dout) throws IOException { super.toByteArray(dout); byte[] buffer = this.getAddress().getAddress(); for (int i = 0; i < buffer.length; i++) { dout.writeByte(buffer[i]); } }
@Override boolean sameValue(DNSRecord other) { if (! (other instanceof Address) ) { return false; } Address address = (Address) other; if ((this.getAddress() == null) && (address.getAddress() != null)) { return false; } return this.getAddress().equals(address.getAddress()); }
@Override protected void toString(StringBuilder aLog) { super.toString(aLog); aLog.append(" address: '" + (this.getAddress() != null ? this.getAddress().getHostAddress() : "null") + "'"); }
@Override protected void toString(StringBuilder aLog) { super.toString(aLog); aLog.append(" address: '" + (this.getAddress() != null ? this.getAddress().getHostAddress() : "null") + "'"); }