List of usage examples for javax.sound.midi MidiFileFormat getType
public int getType()
From source file:Main.java
public static void main(String[] argv) throws Exception { // From file// ww w. j a v a2s .co m MidiFileFormat fformat = MidiSystem.getMidiFileFormat(new File("midifile")); // From URL // fformat = MidiSystem.getMidiFileFormat(new URL("http://hostname/midifile")); // Get file format switch (fformat.getType()) { case 0: // mid break; case 1: // rmf break; } }