javax.sound.midi.spi

Class MidiFileReader

public abstract class MidiFileReader extends Object

The MidiFileReader abstract class defines the methods to be provided by a MIDI file reader.

Since: 1.3

Method Summary
abstract MidiFileFormatgetMidiFileFormat(InputStream stream)
Read a MidiFileFormat from the given stream.
abstract MidiFileFormatgetMidiFileFormat(URL url)
Read a MidiFileFormat from the given stream.
abstract MidiFileFormatgetMidiFileFormat(File file)
Read a MidiFileFormat from the given stream.
abstract SequencegetSequence(InputStream stream)
Read a Sequence from the given stream.
abstract SequencegetSequence(URL url)
Read a Sequence from the given stream.
abstract SequencegetSequence(File file)
Read a Sequence from the given stream.

Method Detail

getMidiFileFormat

public abstract MidiFileFormat getMidiFileFormat(InputStream stream)
Read a MidiFileFormat from the given stream.

Parameters: stream the stream from which to read the MIDI data

Returns: the MidiFileFormat object

Throws: InvalidMidiDataException if the stream refers to invalid data IOException if an I/O exception occurs while reading

getMidiFileFormat

public abstract MidiFileFormat getMidiFileFormat(URL url)
Read a MidiFileFormat from the given stream.

Parameters: url the url from which to read the MIDI data

Returns: the MidiFileFormat object

Throws: InvalidMidiDataException if the url refers to invalid data IOException if an I/O exception occurs while reading

getMidiFileFormat

public abstract MidiFileFormat getMidiFileFormat(File file)
Read a MidiFileFormat from the given stream.

Parameters: file the file from which to read the MIDI data

Returns: the MidiFileFormat object

Throws: InvalidMidiDataException if the file refers to invalid data IOException if an I/O exception occurs while reading

getSequence

public abstract Sequence getSequence(InputStream stream)
Read a Sequence from the given stream.

Parameters: stream the stream from which to read the MIDI data

Returns: the Sequence object

Throws: InvalidMidiDataException if the stream refers to invalid data IOException if an I/O exception occurs while reading

getSequence

public abstract Sequence getSequence(URL url)
Read a Sequence from the given stream.

Parameters: url the url from which to read the MIDI data

Returns: the Sequence object

Throws: InvalidMidiDataException if the url refers to invalid data IOException if an I/O exception occurs while reading

getSequence

public abstract Sequence getSequence(File file)
Read a Sequence from the given stream.

Parameters: file the file from which to read the MIDI data

Returns: the Sequence object

Throws: InvalidMidiDataException if the file refers to invalid data IOException if an I/O exception occurs while reading