This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.sound.midi.spi
class MidiFileReader

java.lang.Object extended by javax.sound.midi.spi.MidiFileReader

Most common way to construct:

List providers = …;
int i = …;

MidiFileReader reader = (MidiFileReader)providers.get(i);

Based on 12 examples


public abstract class MidiFileReader
extends Object

A MidiFileReader supplies MIDI file-reading services. Classes implementing this interface can parse the format information from one or more types of MIDI file, and can produce a Sequence object from files of these types.


Constructor Summary

          
 
Method Summary
abstract MidiFileFormat

          Obtains the MIDI file format of the File provided.
abstract MidiFileFormat

          Obtains the MIDI file format of the input stream provided.
abstract MidiFileFormat

          Obtains the MIDI file format of the URL provided.
abstract Sequence

          Obtains a MIDI sequence from the File provided.
abstract Sequence

          Obtains a MIDI sequence from the input stream provided.
abstract Sequence

          Obtains a MIDI sequence from the URL provided.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MidiFileReader

public MidiFileReader()
Method Detail

getMidiFileFormat

public abstract MidiFileFormat getMidiFileFormat(File file)
                                          throws InvalidMidiDataException,
                                                 IOException
Obtains the MIDI file format of the File provided. The File must point to valid MIDI file data.

Parameters:
file - the File from which file format information should be extracted
Returns:
a MidiFileFormat object describing the MIDI file format
Throws:
InvalidMidiDataException - if the File does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs

getMidiFileFormat

public abstract MidiFileFormat getMidiFileFormat(InputStream stream)
                                          throws InvalidMidiDataException,
                                                 IOException
Obtains the MIDI file format of the input stream provided. The stream must point to valid MIDI file data. In general, MIDI file readers may need to read some data from the stream before determining whether they support it. These parsers must be able to mark the stream, read enough data to determine whether they support the stream, and, if not, reset the stream's read pointer to its original position. If the input stream does not support this, this method may fail with an IOException.

Parameters:
stream - the input stream from which file format information should be extracted
Returns:
a MidiFileFormat object describing the MIDI file format
Throws:
InvalidMidiDataException - if the stream does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs

getMidiFileFormat

public abstract MidiFileFormat getMidiFileFormat(URL url)
                                          throws InvalidMidiDataException,
                                                 IOException
Obtains the MIDI file format of the URL provided. The URL must point to valid MIDI file data.

Parameters:
url - the URL from which file format information should be extracted
Returns:
a MidiFileFormat object describing the MIDI file format
Throws:
InvalidMidiDataException - if the URL does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs

getSequence

public abstract Sequence getSequence(File file)
                              throws InvalidMidiDataException,
                                     IOException
Obtains a MIDI sequence from the File provided. The File must point to valid MIDI file data.

Parameters:
file - the File from which the Sequence should be constructed
Returns:
a Sequence object based on the MIDI file data pointed to by the File
Throws:
InvalidMidiDataException - if the File does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs

getSequence

public abstract Sequence getSequence(InputStream stream)
                              throws InvalidMidiDataException,
                                     IOException
Obtains a MIDI sequence from the input stream provided. The stream must point to valid MIDI file data. In general, MIDI file readers may need to read some data from the stream before determining whether they support it. These parsers must be able to mark the stream, read enough data to determine whether they support the stream, and, if not, reset the stream's read pointer to its original position. If the input stream does not support this, this method may fail with an IOException.

Parameters:
stream - the input stream from which the Sequence should be constructed
Returns:
a Sequence object based on the MIDI file data contained in the input stream.
Throws:
InvalidMidiDataException - if the stream does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs

getSequence

public abstract Sequence getSequence(URL url)
                              throws InvalidMidiDataException,
                                     IOException
Obtains a MIDI sequence from the URL provided. The URL must point to valid MIDI file data.

Parameters:
url - the URL for which the Sequence should be constructed
Returns:
a Sequence object based on the MIDI file data pointed to by the URL
Throws:
InvalidMidiDataException - if the URL does not point to valid MIDI file data recognized by the system
IOException - if an I/O exception occurs


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.