void insertPage(int pageNum, final PRIndirectReference ref) {
            --pageNum;
            if (refsn != null) {
                if (pageNum >= refsn.size())
                    refsn.add(ref);
                else
                    refsn.add(pageNum, ref);
            }
            else {
                ++sizep;
                lastPageRead = -1;
                if (pageNum >= size()) {
                    refsp.put(size(), ref.getNumber());
                }
                else {
                    IntHashtable refs2 = new IntHashtable((refsp.size() + 1) * 2);
                    for (Iterator<IntHashtable.Entry> it = refsp.getEntryIterator(); it.hasNext();) {
                        IntHashtable.Entry entry = it.next();
                        int p = entry.getKey();
                        refs2.put(p >= pageNum ? p + 1 : p, entry.getValue());
                    }
                    refs2.put(pageNum, ref.getNumber());
                    refsp = refs2;
                }
            }
        }