KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > sound > midi > spi > SoundbankReader


1 /*
2  * @(#)SoundbankReader.java 1.18 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.sound.midi.spi;
9
10 import java.io.InputStream JavaDoc;
11 import java.io.IOException JavaDoc;
12 import java.io.File JavaDoc;
13
14 import java.net.URL JavaDoc;
15
16 import javax.sound.midi.Soundbank JavaDoc;
17 import javax.sound.midi.InvalidMidiDataException JavaDoc;
18
19
20 /**
21  * A <code>SoundbankReader</code> supplies soundbank file-reading services.
22  * Concrete subclasses of <code>SoundbankReader</code> parse a given
23  * soundbank file, producing a {@link javax.sound.midi.Soundbank}
24  * object that can be loaded into a {@link javax.sound.midi.Synthesizer}.
25  *
26  * @since 1.3
27  * @version 1.18 03/12/19
28  * @author Kara Kytle
29  */

30 public abstract class SoundbankReader {
31
32
33     /**
34      * Obtains a soundbank object from the URL provided.
35      * @param url URL representing the soundbank.
36      * @return soundbank object
37      * @throws InvalidMidiDataException if the URL does not point to
38      * valid MIDI soundbank data recognized by this soundbank reader
39      * @throws IOException if an I/O error occurs
40      */

41     public abstract Soundbank JavaDoc getSoundbank(URL JavaDoc url) throws InvalidMidiDataException JavaDoc, IOException JavaDoc;
42
43
44     /**
45      * Obtains a soundbank object from the <code>InputStream</code> provided.
46      * @param stream <code>InputStream</code> representing the soundbank
47      * @return soundbank object
48      * @throws InvalidMidiDataException if the stream does not point to
49      * valid MIDI soundbank data recognized by this soundbank reader
50      * @throws IOException if an I/O error occurs
51      */

52     public abstract Soundbank JavaDoc getSoundbank(InputStream JavaDoc stream) throws InvalidMidiDataException JavaDoc, IOException JavaDoc;
53
54
55     /**
56      * Obtains a soundbank object from the <code>File</code> provided.
57      * @param file the <code>File</code> representing the soundbank
58      * @return soundbank object
59      * @throws InvalidMidiDataException if the file does not point to
60      * valid MIDI soundbank data recognized by this soundbank reader
61      * @throws IOException if an I/O error occurs
62      */

63     public abstract Soundbank JavaDoc getSoundbank(File JavaDoc file) throws InvalidMidiDataException JavaDoc, IOException JavaDoc;
64
65
66
67 }
68
Popular Tags