int addSize = grpprl[offset++];
int start = offset;
for (int x = 0; x < addSize; x++)
{
Integer key = Integer.valueOf(LittleEndian.getShort(grpprl, offset));
TabDescriptor val = new TabDescriptor( grpprl, start + ((TabDescriptor.getSize() * addSize) + x) );
tabMap.put(key, val);
offset += LittleEndian.SHORT_SIZE;
}
tabPositions = new int[tabMap.size()];
tabDescriptors = new TabDescriptor[tabPositions.length];
List<Integer> list = new ArrayList<Integer>(tabMap.keySet());
Collections.sort(list);
for (int x = 0; x < tabPositions.length; x++)
{
Integer key = list.get(x);
tabPositions[x] = key.intValue();
if (tabMap.containsKey( key ))
tabDescriptors[x] = tabMap.get(key);
else
tabDescriptors[x] = new TabDescriptor();
}
pap.setRgdxaTab(tabPositions);
pap.setRgtbd(tabDescriptors);
}