MidiEvent status not recognised by Java

Dear all,

I am developing some software that can deal with MIDI files and do some fun stuff with them, but I am running into some strange trouble when analysing the MidiEvents.

I want to list all the MidiEvents occurring in a particular Track, with their tickposition, status, and precise byte-message. The tick position works fine, but I am having troubles with the status bytes.

Many of the MidiEvents are not recognised by Java and are neither NoteOn nor NoteOff events, although I think they should be. Is it me having implemented something wrong, or are these MIDI-files with a really strange format?