static int checkBlockSize(int blockSize,int minBlockSize,int maxBlockSize){
  if (blockSize < minBlockSize || blockSize > maxBlockSize) {
    throw new IllegalArgumentException("blockSize must be >= " + minBlockSize + " and <= "+ maxBlockSize+ ", got "+ blockSize);
  }
  if ((blockSize & (blockSize - 1)) != 0) {
    throw new IllegalArgumentException("blockSize must be a power of two, got " + blockSize);
  }
  return Integer.numberOfTrailingZeros(blockSize);
}

static int checkBlockSize ( int blockSize , int minBlockSize , int maxBlockSize ) { if ( blockSize < minBlockSize || blockSize > maxBlockSize ) { throw new IllegalArgumentException ( "blockSize must be >= " + minBlockSize + " and <= " + maxBlockSize + ", got " + blockSize ) ; } if ( ( blockSize & ( blockSize - 1 ) ) != 0 ) { throw new IllegalArgumentException ( "blockSize must be a power of two, got " + blockSize ) ; } return Integer . numberOfTrailingZeros ( blockSize ) ; }
check that the block size is a power of 2 , in the right bounds , and return its log in base 2 .
