示例#1
0
 void rrFromWire(DNSInput in) throws IOException {
   host = new Name(in);
   admin = new Name(in);
   serial = in.readU32();
   refresh = in.readU32();
   retry = in.readU32();
   expire = in.readU32();
   minimum = in.readU32();
 }
示例#2
0
  void rrFromWire(DNSInput in) throws IOException {
    int version;

    version = in.readU8();
    if (version != 0) throw new WireParseException("Invalid LOC version");

    size = parseLOCformat(in.readU8());
    hPrecision = parseLOCformat(in.readU8());
    vPrecision = parseLOCformat(in.readU8());
    latitude = in.readU32();
    longitude = in.readU32();
    altitude = in.readU32();
  }
  static Record fromWire(DNSInput in, int section, boolean isUpdate) throws IOException {
    int type, dclass;
    long ttl;
    int length;
    Name name;
    Record rec;

    name = new Name(in);
    type = in.readU16();
    dclass = in.readU16();

    if (section == Section.QUESTION) return newRecord(name, type, dclass);

    ttl = in.readU32();
    length = in.readU16();
    if (length == 0 && isUpdate) return newRecord(name, type, dclass, ttl);
    rec = newRecord(name, type, dclass, ttl, length, in);
    return rec;
  }