for (int i = 0; i < bufferArrayList.size(); i++) {
for (int i = 0; s>0; i++) {
public long[] toLongArray() {    if (size > 0) {        long[] resultArray = new long[size];        //copy all the content int into the resultArray        int array_offset = 0;        for (int i = 0; i < bufferArrayList.size(); i++) {            System.arraycopy(                (int[]) bufferArrayList.get(i),                0,                resultArray,                array_offset,                //(i == (bufferArrayList.size() - 1)) ? size - ((size>>exp)<<exp) : pageSize);                (i == (bufferArrayList.size() - 1)) ? (size & r) : pageSize);            array_offset += pageSize;        }        return resultArray;    }    return null;}