private int arraySize(int end, int next, int blockSize) {
        int size = end - next;
        if ((size % blockSize) != 0) {
            throw new ConversionException("Invalid array size");
        }
        return size / blockSize;
    }