Exemplo n.º 1
0
 private static final Record getEmptyRecord(
     Name name, int type, int dclass, long ttl, boolean hasData) {
   Record rec;
   if (hasData) rec = getTypedObject(type).getObject();
   else rec = new EmptyRecord();
   rec.name = name;
   rec.type = type;
   rec.dclass = dclass;
   rec.ttl = ttl;
   return rec;
 }
Exemplo n.º 2
0
 /**
  * Creates a new record identical to the current record, but with a different name. This is most
  * useful for replacing the name of a wildcard record.
  */
 public Record withName(Name name) {
   if (!name.isAbsolute()) throw new RelativeNameException(name);
   Record rec = cloneRecord();
   rec.name = name;
   return rec;
 }