MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / fromWire

Method fromWire

src/main/java/core/org/xbill/DNS/Record.java:175–197  ·  view source on GitHub ↗
(DNSInput in, int section, boolean isUpdate)

Source from the content-addressed store, hash-verified

173}
174
175static Record
176fromWire(DNSInput in, int section, boolean isUpdate) throws IOException {
177 int type, dclass;
178 long ttl;
179 int length;
180 Name name;
181 Record rec;
182
183 name = new Name(in);
184 type = in.readU16();
185 dclass = in.readU16();
186
187 if (section == Section.QUESTION)
188 return newRecord(name, type, dclass);
189
190 ttl = in.readU32();
191 length = in.readU16();
192 if (length == 0 && isUpdate &&
193 (section == Section.PREREQ || section == Section.UPDATE))
194 return newRecord(name, type, dclass, ttl);
195 rec = newRecord(name, type, dclass, ttl, length, in);
196 return rec;
197}
198
199static Record
200fromWire(DNSInput in, int section) throws IOException {

Callers 1

MessageMethod · 0.95

Calls 3

newRecordMethod · 0.95
readU16Method · 0.80
readU32Method · 0.80

Tested by

no test coverage detected