if (event != null) {
// read data into the new event and
// add the new event to the Track object
event.setTime(deltaTime);
event.read(dis);
track.addEvent(event);
// event.print();
if (event instanceof EndTrack)
break;
} else {
// skip the stream ahead to next valid event