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

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

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

Record.getEmptyRecord介绍

暂无

代码示例

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

/**
 * Creates a new empty record, with the given parameters.
 * @param name The owner name of the record.
 * @param type The record's type.
 * @param dclass The record's class.
 * @param ttl The record's time to live.
 * @return An object of a subclass of Record
 */
public static Record
newRecord(Name name, int type, int dclass, long ttl) {
  if (!name.isAbsolute())
    throw new RelativeNameException(name);
  Type.check(type);
  DClass.check(dclass);
  TTL.check(ttl);

  return getEmptyRecord(name, type, dclass, ttl, false);
}

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

/**
 * Creates a new empty record, with the given parameters.
 * @param name The owner name of the record.
 * @param type The record's type.
 * @param dclass The record's class.
 * @param ttl The record's time to live.
 * @return An object of a subclass of Record
 */
public static Record
newRecord(Name name, int type, int dclass, long ttl) {
  if (!name.isAbsolute())
    throw new RelativeNameException(name);
  Type.check(type);
  DClass.check(dclass);
  TTL.check(ttl);

  return getEmptyRecord(name, type, dclass, ttl, false);
}

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

/**
 * Creates a new empty record, with the given parameters.
 * @param name The owner name of the record.
 * @param type The record's type.
 * @param dclass The record's class.
 * @param ttl The record's time to live.
 * @return An object of a subclass of Record
 */
public static Record
newRecord(Name name, int type, int dclass, long ttl) {
  if (!name.isAbsolute())
    throw new RelativeNameException(name);
  Type.check(type);
  DClass.check(dclass);
  TTL.check(ttl);

  return getEmptyRecord(name, type, dclass, ttl, false);
}

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

/**
 * Creates a new empty record, with the given parameters.
 * @param name The owner name of the record.
 * @param type The record's type.
 * @param dclass The record's class.
 * @param ttl The record's time to live.
 * @return An object of a subclass of Record
 */
public static Record
newRecord(Name name, int type, int dclass, long ttl) {
  if (!name.isAbsolute())
    throw new RelativeNameException(name);
  Type.check(type);
  DClass.check(dclass);
  TTL.check(ttl);

  return getEmptyRecord(name, type, dclass, ttl, false);
}

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

代码示例来源: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: 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: net.sf.dnsjava-osgi/dnsjava-osgi

rec = getEmptyRecord(name, type, dclass, ttl, true);
rec.rdataFromString(st, origin);
t = st.get();

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

rec = getEmptyRecord(name, type, dclass, ttl, true);
rec.rdataFromString(st, origin);
t = st.get();

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

rec = getEmptyRecord(name, type, dclass, ttl, true);
rec.rdataFromString(st, origin);
t = st.get();

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

rec = getEmptyRecord(name, type, dclass, ttl, true);
rec.rdataFromString(st, origin);
t = st.get();

相关文章