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

Method getEmptyRecord

src/main/java/core/org/xbill/DNS/Record.java:52–69  ·  view source on GitHub ↗
(Name name, int type, int dclass, long ttl, boolean hasData)

Source from the content-addressed store, hash-verified

50getObject();
51
52private static final Record
53getEmptyRecord(Name name, int type, int dclass, long ttl, boolean hasData) {
54 Record proto, rec;
55
56 if (hasData) {
57 proto = Type.getProto(type);
58 if (proto != null)
59 rec = proto.getObject();
60 else
61 rec = new UNKRecord();
62 } else
63 rec = new EmptyRecord();
64 rec.name = name;
65 rec.type = type;
66 rec.dclass = dclass;
67 rec.ttl = ttl;
68 return rec;
69}
70
71/**
72 * Converts the type-specific RR to wire format - must be overriden

Callers 2

newRecordMethod · 0.95
fromStringMethod · 0.95

Calls 2

getProtoMethod · 0.95
getObjectMethod · 0.95

Tested by

no test coverage detected