public boolean matches(byte[] candidate) { if (value.length != candidate.length) { return false; } return !BitMap.hasAnyBitSet(BitMap.xor(value, BitMap.and(candidate, mask))); }
public void validateMask() throws AclFormatException { if (BitMap.hasAnyBitSet(BitMap.and(value, BitMap.not(mask)))) { throw new AclFormatException( "The base address '" + ServerAcl.dottedNotation(value) + "' is too specific for block-size-spec /" + bitBlockSize); } }