Getting information about a MIDI file

Purpose. Displays general information about a MIDI file: MIDI file type, division type, timing resolution, length (in ticks) and duration (in μs)

Usage. 

java MidiFileInfo [[ -f ] | [ -u ] | [ -s ]] [ -i ] [ midifile ]

Parameters. 

-s

use standard input as source for the MIDI file. If this option is given, midifile is not required.

-f

interpret midifile as filename. This is the default. If this option is given, midifile is required.

-u

interpret midifile as URL. If this option is given, midifile is required.

-i

display additional information

midifile

the filename or URL of the MIDI file that should be used

Bugs, limitations.  Some combination of options do not work. With Sun's implementation tick and microsecond length are only shown with option -i. With Tritonus, length and duration cannot be displayed at all.

Source code.  MidiFileInfo.java