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

x33g5p2x  于2022-01-29 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(93)

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

Record.toWire介绍

暂无

代码示例

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

void
toWire(DNSOutput out) {
  header.toWire(out);
  Compression c = new Compression();
  for (int i = 0; i < 4; i++) {
    if (sections[i] == null)
      continue;
    for (int j = 0; j < sections[i].size(); j++) {
      Record rec = (Record)sections[i].get(j);
      rec.toWire(out, i, c);
    }
  }
}

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

void
toWire(DNSOutput out) {
  header.toWire(out);
  Compression c = new Compression();
  for (int i = 0; i < 4; i++) {
    if (sections[i] == null)
      continue;
    for (int j = 0; j < sections[i].size(); j++) {
      Record rec = (Record)sections[i].get(j);
      rec.toWire(out, i, c);
    }
  }
}

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

void
toWire(DNSOutput out) {
  header.toWire(out);
  Compression c = new Compression();
  for (int i = 0; i < 4; i++) {
    if (sections[i] == null)
      continue;
    for (int j = 0; j < sections[i].size(); j++) {
      Record rec = (Record)sections[i].get(j);
      rec.toWire(out, i, c);
    }
  }
}

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

void
toWire(DNSOutput out) {
  header.toWire(out);
  Compression c = new Compression();
  for (int i = 0; i < 4; i++) {
    if (sections[i] == null)
      continue;
    for (int j = 0; j < sections[i].size(); j++) {
      Record rec = (Record)sections[i].get(j);
      rec.toWire(out, i, c);
    }
  }
}

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

/**
 * Converts a Record into DNS uncompressed wire format.
 */
public byte []
toWire(int section) {
  DNSOutput out = new DNSOutput();
  toWire(out, section, null);
  return out.toByteArray();
}

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

/**
 * Converts a Record into DNS uncompressed wire format.
 */
public byte []
toWire(int section) {
  DNSOutput out = new DNSOutput();
  toWire(out, section, null);
  return out.toByteArray();
}

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

/**
 * Converts a Record into DNS uncompressed wire format.
 */
public byte []
toWire(int section) {
  DNSOutput out = new DNSOutput();
  toWire(out, section, null);
  return out.toByteArray();
}

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

/**
 * Converts a Record into DNS uncompressed wire format.
 */
public byte []
toWire(int section) {
  DNSOutput out = new DNSOutput();
  toWire(out, section, null);
  return out.toByteArray();
}

代码示例来源: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

rec.toWire(out, section, c);
if (out.current() > maxLength) {
  out.jump(pos);

相关文章