MCPcopy Create free account
hub / github.com/faceless2/zeroconf / readQuestion

Method readQuestion

src/main/com/bfo/zeroconf/Record.java:259–271  ·  view source on GitHub ↗
(ByteBuffer in)

Source from the content-addressed store, hash-verified

257 }
258
259 static Record readQuestion(ByteBuffer in) {
260// System.out.println("RECORD: " + Packet.dump(in));
261 int tell = in.position();
262 try {
263 String name = readName(in);
264 int type = in.getShort() & 0xFFFF;
265 int clazz = in.getShort() & 0xFFFF;
266 return new Record(type, clazz, 0, name, null);
267 } catch (Exception e) {
268 ((Buffer)in).position(tell);
269 throw (RuntimeException)new RuntimeException("Failed reading record " + Packet.dump(in)).initCause(e);
270 }
271 }
272
273 void write(ByteBuffer out) {
274 final int pos1 = out.position();

Callers 1

PacketMethod · 0.95

Calls 2

readNameMethod · 0.95
dumpMethod · 0.95

Tested by

no test coverage detected