docCategories.clear(false);
if (dpf[doc]==null) {
dpf[doc] = new int[numPartitions][];
}
long category;
while ((category = cli.nextCategory()) <= Integer.MAX_VALUE) {
docCategories.addToArray((int)category);
}
final int size = docCategories.size();
dpf[doc][part] = new int[size];
for (int i=0; i<size; i++) {