Examples of rdataToString()


Examples of org.xbill.DNS.MXRecord.rdataToString()

    Resolver resolver = new SimpleResolver();
//    lookup.setResolver(resolver);
//    lookup.setCache(null);
    for (Record dnsRecord: lookup.run()) {
      MXRecord record = (MXRecord)dnsRecord;
      System.out.println(record.getPriority() + " " + record.rdataToString());
    }
  }
}
View Full Code Here

Examples of org.xbill.DNS.Record.rdataToString()

                            protocolAddresses = new ProtocolAddress[recordCount];

                            for (int i = 0; i < recordCount; i++) {
                                final Record record = records[i];
                                protocolAddresses[i] = new IPv4Address(record.rdataToString());
                            }
                        } else {
                            throw new UnknownHostException(lookup.getErrorString());
                        }
View Full Code Here

Examples of org.xbill.DNS.Record.rdataToString()

        for (final Iterator itr = records.iterator(); itr.hasNext();) {
          final Record record = (Record) itr.next();
          if(record instanceof SRVRecord) {
            result = compareSrvRecord(result, serviceInfo, record);
          } else if(record instanceof TXTRecord) {
            final String[] str = record.rdataToString().split("=");
            final String key = str[0].substring(1);
            final String value = str[1].substring(0, str[1].length() - 1);
            final Object property = serviceInfo.getServiceProperties().getProperty(key);
            if(property != null) {
              result += value.equals(property.toString()) ? 1 : -1;
View Full Code Here

Examples of org.xbill.DNS.SPFRecord.rdataToString()

                            TXTRecord txt = (TXTRecord) rr[i];
                            res = txt.rdataToString();
                            break;
                        case SPF:
                            SPFRecord spf = (SPFRecord) rr[i];
                            res = spf.rdataToString();
                            break;
                        default:
                            return null;
                    }
                    records.add(res);
View Full Code Here

Examples of org.xbill.DNS.SPFRecord.rdataToString()

                        TXTRecord txt = (TXTRecord) rr[i];
                        records.add(txt.rdataToString());
                        break;
                    case Type.SPF:
                        SPFRecord spf = (SPFRecord) rr[i];
                        records.add(spf.rdataToString());
                        break;
                    default:
                        return null;
                }
            }
View Full Code Here

Examples of org.xbill.DNS.TXTRecord.rdataToString()

                            PTRRecord ptr = (PTRRecord) rr[i];
                            res = IPAddr.stripDot(ptr.getTarget().toString());
                            break;
                        case TXT:
                            TXTRecord txt = (TXTRecord) rr[i];
                            res = txt.rdataToString();
                            break;
                        case SPF:
                            SPFRecord spf = (SPFRecord) rr[i];
                            res = spf.rdataToString();
                            break;
View Full Code Here

Examples of org.xbill.DNS.TXTRecord.rdataToString()

        Record[] records = lookupNoException(hostname, Type.TXT, "TXT");
   
        if (records != null) {
           for (int i = 0; i < records.length; i++) {
               TXTRecord txt = (TXTRecord) records[i];
               txtR.add(txt.rdataToString());
           }
       
        }
        return txtR;
    }
View Full Code Here

Examples of org.xbill.DNS.TXTRecord.rdataToString()

        Record[] records = lookupNoException(hostname, Type.TXT, "TXT");

        if (records != null) {
            for (Record record : records) {
                TXTRecord txt = (TXTRecord) record;
                txtR.add(txt.rdataToString());
            }

        }
        return txtR;
    }
View Full Code Here

Examples of org.xbill.DNS.TXTRecord.rdataToString()

                        PTRRecord ptr = (PTRRecord) rr[i];
                        records.add(IPAddr.stripDot(ptr.getTarget().toString()));
                        break;
                    case Type.TXT:
                        TXTRecord txt = (TXTRecord) rr[i];
                        records.add(txt.rdataToString());
                        break;
                    case Type.SPF:
                        SPFRecord spf = (SPFRecord) rr[i];
                        records.add(spf.rdataToString());
                        break;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.