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

Method setFlag

src/main/java/core/org/xbill/DNS/Header.java:96–105  ·  view source on GitHub ↗
(int flags, int bit, boolean value)

Source from the content-addressed store, hash-verified

94}
95
96static int
97setFlag(int flags, int bit, boolean value) {
98 checkFlag(bit);
99
100 // bits are indexed from left to right
101 if (value)
102 return flags |= (1 << (15 - bit));
103 else
104 return flags &= ~(1 << (15 - bit));
105}
106
107/**
108 * Sets a flag to the supplied value

Callers 7

doAXFRMethod · 0.95
unsetFlagMethod · 0.95
toWireMethod · 0.95
addAnswerMethod · 0.80
generateReplyMethod · 0.80
newQueryMethod · 0.80
sendAXFRMethod · 0.80

Calls 1

checkFlagMethod · 0.95

Tested by

no test coverage detected