コード例 #1
0
    public boolean matches(byte[] candidate) {

      if (value.length != candidate.length) {
        return false;
      }

      return !BitMap.hasAnyBitSet(BitMap.xor(value, BitMap.and(candidate, mask)));
    }
コード例 #2
0
    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);
      }
    }