Examples of TXTRecord


Examples of org.xbill.DNS.TXTRecord

                for (JsonNode jsonNode : fieldNode) {
                    String string = jsonNode.textValue();
                    checkStringIsASCII(string);
                    strings.add(string);
                }
                return new TXTRecord(name, dclass, ttl, strings);
            } else {
                String strings = fieldNode.textValue();
                checkStringIsASCII(strings);
                return new TXTRecord(name, dclass, ttl, strings);
            }
        } catch (final JsonDeserializationException e) {
            throw e;
    } catch (final Exception e) {
      throw new JsonDeserializationException(
View Full Code Here

Examples of org.xbill.DNS.TXTRecord

        List<String> txtR = new ArrayList<String>();
        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

                    case Type.PTR:
                        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

Examples of org.xbill.DNS.TXTRecord

                                            records.add(new SPFRecord(hostname,
                                                    DClass.IN, 3600, (String) value));
                                        }
                                    } else if ("TXT".equals(type)) {
                                        if (value instanceof List) {
                                            records.add(new TXTRecord(hostname,
                                                    DClass.IN, 3600, (List) value));
                                        } else {
                                            records.add(new TXTRecord(hostname,
                                                    DClass.IN, 3600, (String) value));
                                        }
                                    } else {
                                        if (!((String) value).endsWith(".")) {
                                            value = ((String) value)+".";
View Full Code Here

Examples of org.xbill.DNS.TXTRecord

      Lookup txtQuery = new Lookup(srvRecord.getName(), Type.TXT);
      txtQuery.setResolver(resolver);
      Record[] txtQueryResults = txtQuery.run();
      int length = txtQueryResults == null ? 0 : txtQueryResults.length;
      for (int l = 0; l < length; l++) {
        TXTRecord txtResult = (TXTRecord) txtQueryResults[l];
        List strings = txtResult.getStrings();
        for (Iterator itr = strings.iterator(); itr.hasNext();) {
          String str = (String) itr.next();
          String[] split = str.split("="); //$NON-NLS-1$
          props.put(split[0], split[1]);
        }
View Full Code Here

Examples of org.xbill.DNS.TXTRecord

    while (enumeration.hasMoreElements()) {
      final Object property = enumeration.nextElement();
      final String key = property.toString();
      final String value = (String) properties.getProperty(key).toString();
      final long ttl = serviceInfo.getTTL();
      result.add(new TXTRecord(aRecord.getName(), DClass.IN, ttl, key + "=" + value)); //$NON-NLS-1$
    }
    return (Record[]) result.toArray(new Record[result.size()]);
  }
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.