Pointer p;
if(version >= 6) {
p = new PointerV6();
p.type = LittleEndian.getInt(data, offset+0);
p.address = (int)LittleEndian.getUInt(data, offset+4);
p.offset = (int)LittleEndian.getUInt(data, offset+8);
p.length = (int)LittleEndian.getUInt(data, offset+12);
p.format = LittleEndian.getShort(data, offset+16);
return p;
} else if(version == 5) {
throw new RuntimeException("TODO");
} else {
throw new IllegalArgumentException("Visio files with versions below 5 are not supported, yours was " + version);
}