public static void checkPageSize(final int pageSize)
    {
        if (pageSize < PAGE_MIN_SIZE)
        {
            throw new IllegalStateException(
                "Page size less than min size of " + PAGE_MIN_SIZE + ": page size=" + pageSize);
        }

        if (pageSize > PAGE_MAX_SIZE)
        {
            throw new IllegalStateException(
                "Page size more than max size of " + PAGE_MAX_SIZE + ": page size=" + pageSize);
        }

        if (!BitUtil.isPowerOfTwo(pageSize))
        {
            throw new IllegalStateException("Page size not a power of 2: page size=" + pageSize);
        }
    }
public static void checkPageSize(final int pageSize)
    {
        if (pageSize < PAGE_MIN_SIZE)
        {
            throw new IllegalStateException(
                "Page size less than min size of " + PAGE_MIN_SIZE + ": page size=" + pageSize);
        }

        if (pageSize > PAGE_MAX_SIZE)
        {
            throw new IllegalStateException(
                "Page size more than max size of " + PAGE_MAX_SIZE + ": page size=" + pageSize);
        }

        if (!BitUtil.isPowerOfTwo(pageSize))
        {
            throw new IllegalStateException("Page size not a power of 2: page size=" + pageSize);
        }
    }
public static void checkPageSize ( final int pageSize ) { if ( pageSize < PAGE_MIN_SIZE ) { throw new IllegalStateException ( "Page size less than min size of " + PAGE_MIN_SIZE + ": page size=" + pageSize ) ; } if ( pageSize > PAGE_MAX_SIZE ) { throw new IllegalStateException ( "Page size more than max size of " + PAGE_MAX_SIZE + ": page size=" + pageSize ) ; } if ( ! BitUtil . isPowerOfTwo ( pageSize ) ) { throw new IllegalStateException ( "Page size not a power of 2: page size=" + pageSize ) ; } }
Check that page size is valid and alignment is valid.

@param pageSize to be checked.
@throws IllegalStateException if the size is not as expected.
Check that page size is valid and alignment is valid .