static int
setFlag(int flags, int bit, boolean value) {
	checkFlag(bit);

	// bits are indexed from left to right
	if (value)
		return flags |= (1 << (15 - bit));
	else
		return flags &= ~(1 << (15 - bit));
}
Creates a new Header from its DNS wire format representation
@param b A byte array containing the DNS Header.
src/main/java/core/org/xbill/DNS/Header.java