* @throws IOException
*/
private IndexTable[] createIndexTableFromLoader(final PartialLoader loader,
final int factor) throws IOException {
final BasicRecordIterator iterator =
new BasicRecordIterator(loader, this.lengthGetter);
final int capacity = (factor == 0 ? 10000 : factor);
final List<Long> temp = new ArrayList<Long>(capacity); // Rough estimate
final List<IndexTable> it = new ArrayList<IndexTable>(100);
long next = 0;
long previous = 0;
while (iterator.hasNext()) {
final long regional = iterator.getPosition();
temp.add(regional);
iterator.skip();
this.length++;
if ((factor != 0) && (this.length % factor == 0)) {
it.add(new SoftTable(temp, loader));
temp.clear();