-
Bug
-
Resolution: Fixed
-
P2
-
5.0
-
tiger
-
generic
-
generic
Name: fb126949 Date: 08/22/2003
I have an applet that plays a MIDI file.
First I had a small MIDI file with 2 tracks, about 2kb. It ran fine in the
applet, both file: protocol (locally) as http: protocol (remote).
Then I tried to open a larger MIDI file, 5 tracks, 12Kb. I get an exception
when I run the applet using a http url in MSIE6.0, Java Plug-in Version
1.4.2:
IO exception:
java.io.EOFException
at com.sun.media.sound.SMFParser.nextTrack(Unknown Source)
at com.sun.media.sound.StandardMidiFileReader.getSequence(Unknown Source)
at com.sun.media.sound.StandardMidiFileReader.getSequence(Unknown Source)
----
Now I use
result = MidiSystem.getSequence(new BufferedInputStream(url.openStream()));
(The BufferedInputStream is necessary for the required mark and reset operations.)
instead of
result = MidiSystem.getSequence(url);
This solved my problem.
======================================================================