org.xbill.DNS.Message.sameSet()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(208)

本文整理了Java中org.xbill.DNS.Message.sameSet()方法的一些代码示例,展示了Message.sameSet()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.sameSet()方法的具体详情如下:
包路径:org.xbill.DNS.Message
类名称:Message
方法名:sameSet

Message.sameSet介绍

暂无

代码示例

代码示例来源:origin: tiandawu/IotXmpp

private int
sectionToWire(DNSOutput out, int section, Compression c,
     int maxLength)
{
  int n = sections[section].size();
  int pos = out.current();
  int rendered = 0;
  Record lastrec = null;

  for (int i = 0; i < n; i++) {
    Record rec = (Record)sections[section].get(i);
    if (lastrec != null && !sameSet(rec, lastrec)) {
      pos = out.current();
      rendered = i;
    }
    lastrec = rec;
    rec.toWire(out, section, c);
    if (out.current() > maxLength) {
      out.jump(pos);
      return n - rendered;
    }
  }
  return 0;
}

代码示例来源:origin: net.sf.dnsjava-osgi/dnsjava-osgi

private int
sectionToWire(DNSOutput out, int section, Compression c,
     int maxLength)
{
  int n = sections[section].size();
  int pos = out.current();
  int rendered = 0;
  Record lastrec = null;

  for (int i = 0; i < n; i++) {
    Record rec = (Record)sections[section].get(i);
    if (lastrec != null && !sameSet(rec, lastrec)) {
      pos = out.current();
      rendered = i;
    }
    lastrec = rec;
    rec.toWire(out, section, c);
    if (out.current() > maxLength) {
      out.jump(pos);
      return n - rendered;
    }
  }
  return 0;
}

代码示例来源:origin: org.littleshoot/dnsjava

private int
sectionToWire(DNSOutput out, int section, Compression c,
     int maxLength)
{
  int n = sections[section].size();
  int pos = out.current();
  int rendered = 0;
  Record lastrec = null;

  for (int i = 0; i < n; i++) {
    Record rec = (Record)sections[section].get(i);
    if (lastrec != null && !sameSet(rec, lastrec)) {
      pos = out.current();
      rendered = i;
    }
    lastrec = rec;
    rec.toWire(out, section, c);
    if (out.current() > maxLength) {
      out.jump(pos);
      return n - rendered;
    }
  }
  return 0;
}

代码示例来源:origin: dnsjava/dnsjava

if (lastrec != null && !sameSet(rec, lastrec)) {
  pos = out.current();
  rendered = i;

相关文章