本文整理汇总了Java中de.measite.minidns.record.Data类的典型用法代码示例。如果您正苦于以下问题:Java Data类的具体用法?Java Data怎么用?Java Data使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Data类属于de.measite.minidns.record包,在下文中一共展示了Data类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createNamePortBundle
import de.measite.minidns.record.Data; //导入依赖的package包/类
private static Bundle createNamePortBundle(String name, int port, Data data) {
Bundle namePort = new Bundle();
namePort.putString("name", name);
namePort.putInt("port", port);
if (data instanceof A) {
namePort.putString("ip", data.toString());
} else if (data instanceof AAAA) {
namePort.putString("ip","["+data.toString()+"]");
}
return namePort;
}
开发者ID:xavierle,项目名称:messengerxmpp,代码行数:12,代码来源:DNSHelper.java
示例2: fillSrvMaps
import de.measite.minidns.record.Data; //导入依赖的package包/类
private static void fillSrvMaps(final String qname, final InetAddress dnsServer, final Map<Integer, List<TlsSrv>> priorities, final Map<String, List<String>> ips4, final Map<String, List<String>> ips6, final boolean tls) throws IOException {
final DNSMessage message = client.query(qname, TYPE.SRV, CLASS.IN, dnsServer.getHostAddress());
for (Record[] rrset : new Record[][] { message.getAnswers(), message.getAdditionalResourceRecords() }) {
for (Record rr : rrset) {
Data d = rr.getPayload();
if (d instanceof SRV && NameUtil.idnEquals(qname, rr.getName())) {
SRV srv = (SRV) d;
if (!priorities.containsKey(srv.getPriority())) {
priorities.put(srv.getPriority(),new ArrayList<TlsSrv>());
}
priorities.get(srv.getPriority()).add(new TlsSrv(srv, tls));
}
if (d instanceof A) {
A a = (A) d;
if (!ips4.containsKey(rr.getName())) {
ips4.put(rr.getName(), new ArrayList<String>());
}
ips4.get(rr.getName()).add(a.toString());
}
if (d instanceof AAAA) {
AAAA aaaa = (AAAA) d;
if (!ips6.containsKey(rr.getName())) {
ips6.put(rr.getName(), new ArrayList<String>());
}
ips6.get(rr.getName()).add("[" + aaaa.toString() + "]");
}
}
}
}
开发者ID:Frozenbox,项目名称:frozenchat,代码行数:30,代码来源:DNSHelper.java
示例3: createNamePortBundle
import de.measite.minidns.record.Data; //导入依赖的package包/类
private static Bundle createNamePortBundle(String name, int port, Data data, final boolean tls) {
Bundle namePort = new Bundle();
namePort.putString("name", name);
namePort.putBoolean("tls", tls);
namePort.putInt("port", port);
if (data instanceof A) {
namePort.putString("ip", data.toString());
} else if (data instanceof AAAA) {
namePort.putString("ip","["+data.toString()+"]");
}
return namePort;
}
开发者ID:Frozenbox,项目名称:frozenchat,代码行数:13,代码来源:DNSHelper.java
示例4: resolveWithFallback
import de.measite.minidns.record.Data; //导入依赖的package包/类
private static <D extends Data> ResolverResult<D> resolveWithFallback(DNSName dnsName, Class<D> type) throws IOException {
return resolveWithFallback(dnsName,type,validateHostname());
}
开发者ID:syntafin,项目名称:TenguChat,代码行数:4,代码来源:Resolver.java
示例5: resolveWithFallback
import de.measite.minidns.record.Data; //导入依赖的package包/类
private static <D extends Data> ResolverResult<D> resolveWithFallback(DNSName dnsName, Class<D> type) throws IOException {
return resolveWithFallback(dnsName, type, validateHostname());
}
开发者ID:kriztan,项目名称:Pix-Art-Messenger,代码行数:4,代码来源:Resolver.java
示例6: resolveWithFallback
import de.measite.minidns.record.Data; //导入依赖的package包/类
private static <D extends Data> ResolverResult<D> resolveWithFallback(DNSName dnsName, Class<D> type) throws IOException {
return resolveWithFallback(dnsName, type, validateHostname());
}
开发者ID:siacs,项目名称:Conversations,代码行数:4,代码来源:Resolver.java
示例7: getPayload
import de.measite.minidns.record.Data; //导入依赖的package包/类
/**
* The payload data, usually a subclass of data (A, AAAA, CNAME, ...).
* @return The payload data.
*/
public Data getPayload() {
return payloadData;
}
开发者ID:juanignaciomolina,项目名称:txtr,代码行数:8,代码来源:Record.java
注:本文中的de.measite.minidns.record.Data类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论