- try {
- if (this.streamInput.addPacketHeaderIndex()) {
- packetIndex = getPacketSize() - 1;
- this.packetReader.setCurrentPacket(getPacket());
-
- } else {
- this.packetReader.setCurrentPacket(null);
- }
-
- } catch (CTFReaderException e) {
- this.packetReader.setCurrentPacket(null);
+ // go to the next packet if there is one, index it at the same time
+ if (fStreamInput.addPacketHeaderIndex()) {
+ fPacketIndex = getPacketSize() - 1;
+ fPacketReader.setCurrentPacket(getPacket());
+ } else {
+ // out of packets
+ fPacketReader.setCurrentPacket(null);