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

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

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

Record.rrFromWire介绍

暂无

代码示例

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

private static Record
newRecord(Name name, int type, int dclass, long ttl, int length, DNSInput in)
throws IOException
{
  Record rec;
  rec = getEmptyRecord(name, type, dclass, ttl, in != null);
  if (in != null) {
    if (in.remaining() < length)
      throw new WireParseException("truncated record");
    in.setActive(length);

    rec.rrFromWire(in);

    if (in.remaining() > 0)
      throw new WireParseException("invalid record length");
    in.clearActive();
  }
  return rec;
}

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

private static Record
newRecord(Name name, int type, int dclass, long ttl, int length, DNSInput in)
throws IOException
{
  Record rec;
  rec = getEmptyRecord(name, type, dclass, ttl, in != null);
  if (in != null) {
    if (in.remaining() < length)
      throw new WireParseException("truncated record");
    in.setActive(length);

    rec.rrFromWire(in);

    if (in.remaining() > 0)
      throw new WireParseException("invalid record length");
    in.clearActive();
  }
  return rec;
}

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

private static Record
newRecord(Name name, int type, int dclass, long ttl, int length, DNSInput in)
throws IOException
{
  Record rec;
  rec = getEmptyRecord(name, type, dclass, ttl, in != null);
  if (in != null) {
    if (in.remaining() < length)
      throw new WireParseException("truncated record");
    in.setActive(length);

    rec.rrFromWire(in);

    if (in.remaining() > 0)
      throw new WireParseException("invalid record length");
    in.clearActive();
  }
  return rec;
}

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

private static Record
newRecord(Name name, int type, int dclass, long ttl, int length, DNSInput in)
throws IOException
{
  Record rec;
  int recstart;
  rec = getEmptyRecord(name, type, dclass, ttl, in != null);
  if (in != null) {
    if (in.remaining() < length)
      throw new WireParseException("truncated record");
    in.setActive(length);

    rec.rrFromWire(in);

    if (in.remaining() > 0)
      throw new WireParseException("invalid record length");
    in.clearActive();
  }
  return rec;
}

相关文章