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

Method newRecord

src/main/java/core/org/xbill/DNS/Record.java:77–95  ·  view source on GitHub ↗
(Name name, int type, int dclass, long ttl, int length, DNSInput in)

Source from the content-addressed store, hash-verified

75rrFromWire(DNSInput in) throws IOException;
76
77private static Record
78newRecord(Name name, int type, int dclass, long ttl, int length, DNSInput in)
79throws IOException
80{
81 Record rec;
82 rec = getEmptyRecord(name, type, dclass, ttl, in != null);
83 if (in != null) {
84 if (in.remaining() < length)
85 throw new WireParseException("truncated record");
86 in.setActive(length);
87
88 rec.rrFromWire(in);
89
90 if (in.remaining() > 0)
91 throw new WireParseException("invalid record length");
92 in.clearActive();
93 }
94 return rec;
95}
96
97/**
98 * Creates a new record, with the given parameters.

Callers 8

fromWireMethod · 0.95
fromStringMethod · 0.95
sendQueryMethod · 0.95
UpdateMethod · 0.95
presentMethod · 0.95
absentMethod · 0.95
deleteMethod · 0.95
lookupMethod · 0.95

Calls 9

getEmptyRecordMethod · 0.95
rrFromWireMethod · 0.95
checkMethod · 0.95
checkMethod · 0.95
checkMethod · 0.95
remainingMethod · 0.80
setActiveMethod · 0.80
clearActiveMethod · 0.80
isAbsoluteMethod · 0.80

Tested by

no test coverage detected