javax.sound.midi.spi.SoundbankReader Java Examples
The following examples show how to use
javax.sound.midi.spi.SoundbankReader.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JDK13Services.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
/** * Obtains a List containing installed instances of the providers for the * requested service. The returned List is immutable. * * @param serviceClass The type of providers requested. This should be one * of AudioFileReader.class, AudioFileWriter.class, * FormatConversionProvider.class, MixerProvider.class, * MidiDeviceProvider.class, MidiFileReader.class, * MidiFileWriter.class or SoundbankReader.class. * * @return A List of providers of the requested type. This List is * immutable. */ public static List<?> getProviders(final Class<?> serviceClass) { final List<?> providers; if (!MixerProvider.class.equals(serviceClass) && !FormatConversionProvider.class.equals(serviceClass) && !AudioFileReader.class.equals(serviceClass) && !AudioFileWriter.class.equals(serviceClass) && !MidiDeviceProvider.class.equals(serviceClass) && !SoundbankReader.class.equals(serviceClass) && !MidiFileWriter.class.equals(serviceClass) && !MidiFileReader.class.equals(serviceClass)) { providers = new ArrayList<>(0); } else { providers = JSSecurityManager.getProviders(serviceClass); } return Collections.unmodifiableList(providers); }
Example #2
Source File: JDK13Services.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
/** * Obtains a List containing installed instances of the providers for the * requested service. The returned List is immutable. * * @param serviceClass The type of providers requested. This should be one * of AudioFileReader.class, AudioFileWriter.class, * FormatConversionProvider.class, MixerProvider.class, * MidiDeviceProvider.class, MidiFileReader.class, * MidiFileWriter.class or SoundbankReader.class. * * @return A List of providers of the requested type. This List is * immutable. */ public static List<?> getProviders(final Class<?> serviceClass) { final List<?> providers; if (!MixerProvider.class.equals(serviceClass) && !FormatConversionProvider.class.equals(serviceClass) && !AudioFileReader.class.equals(serviceClass) && !AudioFileWriter.class.equals(serviceClass) && !MidiDeviceProvider.class.equals(serviceClass) && !SoundbankReader.class.equals(serviceClass) && !MidiFileWriter.class.equals(serviceClass) && !MidiFileReader.class.equals(serviceClass)) { providers = new ArrayList<>(0); } else { providers = JSSecurityManager.getProviders(serviceClass); } return Collections.unmodifiableList(providers); }
Example #3
Source File: JDK13Services.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Obtains a List containing installed instances of the providers for the * requested service. The returned List is immutable. * * @param serviceClass The type of providers requested. This should be one * of AudioFileReader.class, AudioFileWriter.class, * FormatConversionProvider.class, MixerProvider.class, * MidiDeviceProvider.class, MidiFileReader.class, * MidiFileWriter.class or SoundbankReader.class. * * @return A List of providers of the requested type. This List is * immutable. */ public static List<?> getProviders(final Class<?> serviceClass) { final List<?> providers; if (!MixerProvider.class.equals(serviceClass) && !FormatConversionProvider.class.equals(serviceClass) && !AudioFileReader.class.equals(serviceClass) && !AudioFileWriter.class.equals(serviceClass) && !MidiDeviceProvider.class.equals(serviceClass) && !SoundbankReader.class.equals(serviceClass) && !MidiFileWriter.class.equals(serviceClass) && !MidiFileReader.class.equals(serviceClass)) { providers = new ArrayList<>(0); } else { providers = JSSecurityManager.getProviders(serviceClass); } return Collections.unmodifiableList(providers); }
Example #4
Source File: JDK13Services.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
/** * Obtains a List containing installed instances of the providers for the * requested service. The returned List is immutable. * * @param serviceClass The type of providers requested. This should be one * of AudioFileReader.class, AudioFileWriter.class, * FormatConversionProvider.class, MixerProvider.class, * MidiDeviceProvider.class, MidiFileReader.class, * MidiFileWriter.class or SoundbankReader.class. * * @return A List of providers of the requested type. This List is * immutable. */ public static List<?> getProviders(final Class<?> serviceClass) { final List<?> providers; if (!MixerProvider.class.equals(serviceClass) && !FormatConversionProvider.class.equals(serviceClass) && !AudioFileReader.class.equals(serviceClass) && !AudioFileWriter.class.equals(serviceClass) && !MidiDeviceProvider.class.equals(serviceClass) && !SoundbankReader.class.equals(serviceClass) && !MidiFileWriter.class.equals(serviceClass) && !MidiFileReader.class.equals(serviceClass)) { providers = new ArrayList<>(0); } else { providers = JSSecurityManager.getProviders(serviceClass); } return Collections.unmodifiableList(providers); }
Example #5
Source File: JDK13Services.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Obtains a List containing installed instances of the providers for the * requested service. The returned List is immutable. * * @param serviceClass The type of providers requested. This should be one * of AudioFileReader.class, AudioFileWriter.class, * FormatConversionProvider.class, MixerProvider.class, * MidiDeviceProvider.class, MidiFileReader.class, * MidiFileWriter.class or SoundbankReader.class. * * @return A List of providers of the requested type. This List is * immutable. */ public static List<?> getProviders(final Class<?> serviceClass) { final List<?> providers; if (!MixerProvider.class.equals(serviceClass) && !FormatConversionProvider.class.equals(serviceClass) && !AudioFileReader.class.equals(serviceClass) && !AudioFileWriter.class.equals(serviceClass) && !MidiDeviceProvider.class.equals(serviceClass) && !SoundbankReader.class.equals(serviceClass) && !MidiFileWriter.class.equals(serviceClass) && !MidiFileReader.class.equals(serviceClass)) { providers = new ArrayList<>(0); } else { providers = JSSecurityManager.getProviders(serviceClass); } return Collections.unmodifiableList(providers); }
Example #6
Source File: JDK13Services.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Obtains a List containing installed instances of the providers for the * requested service. The returned List is immutable. * * @param serviceClass The type of providers requested. This should be one * of AudioFileReader.class, AudioFileWriter.class, * FormatConversionProvider.class, MixerProvider.class, * MidiDeviceProvider.class, MidiFileReader.class, * MidiFileWriter.class or SoundbankReader.class. * * @return A List of providers of the requested type. This List is * immutable. */ public static List<?> getProviders(final Class<?> serviceClass) { final List<?> providers; if (!MixerProvider.class.equals(serviceClass) && !FormatConversionProvider.class.equals(serviceClass) && !AudioFileReader.class.equals(serviceClass) && !AudioFileWriter.class.equals(serviceClass) && !MidiDeviceProvider.class.equals(serviceClass) && !SoundbankReader.class.equals(serviceClass) && !MidiFileWriter.class.equals(serviceClass) && !MidiFileReader.class.equals(serviceClass)) { providers = new ArrayList<>(0); } else { providers = JSSecurityManager.getProviders(serviceClass); } return Collections.unmodifiableList(providers); }
Example #7
Source File: MidiSystem.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Constructs a {@code Soundbank} by reading it from the specified * {@code File}. The {@code File} must point to a valid MIDI soundbank file. * * @param file the source of the sound bank data * @return the sound bank * @throws InvalidMidiDataException if the {@code File} does not point to * valid MIDI soundbank data recognized by the system * @throws IOException if an I/O error occurred when loading the soundbank * @throws NullPointerException if {@code file} is {@code null} */ public static Soundbank getSoundbank(final File file) throws InvalidMidiDataException, IOException { Objects.requireNonNull(file); SoundbankReader sp = null; Soundbank s = null; List<SoundbankReader> providers = getSoundbankReaders(); for(int i = 0; i < providers.size(); i++) { sp = providers.get(i); s = sp.getSoundbank(file); if( s!= null) { return s; } } throw new InvalidMidiDataException("cannot get soundbank from stream"); }
Example #8
Source File: MidiSystem.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Constructs a {@code Soundbank} by reading it from the specified URL. The * URL must point to a valid MIDI soundbank file. * * @param url the source of the sound bank data * @return the sound bank * @throws InvalidMidiDataException if the URL does not point to valid MIDI * soundbank data recognized by the system * @throws IOException if an I/O error occurred when loading the soundbank * @throws NullPointerException if {@code url} is {@code null} */ public static Soundbank getSoundbank(final URL url) throws InvalidMidiDataException, IOException { Objects.requireNonNull(url); SoundbankReader sp = null; Soundbank s = null; List<SoundbankReader> providers = getSoundbankReaders(); for(int i = 0; i < providers.size(); i++) { sp = providers.get(i); s = sp.getSoundbank(url); if( s!= null) { return s; } } throw new InvalidMidiDataException("cannot get soundbank from stream"); }
Example #9
Source File: MidiSystem.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Constructs a MIDI sound bank by reading it from the specified stream. The * stream must point to a valid MIDI soundbank file. In general, MIDI * soundbank providers 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 {@code IOException}. * * @param stream the source of the sound bank data * @return the sound bank * @throws InvalidMidiDataException if the stream does not point to valid * MIDI soundbank data recognized by the system * @throws IOException if an I/O error occurred when loading the soundbank * @throws NullPointerException if {@code stream} is {@code null} * @see InputStream#markSupported * @see InputStream#mark */ public static Soundbank getSoundbank(final InputStream stream) throws InvalidMidiDataException, IOException { Objects.requireNonNull(stream); SoundbankReader sp = null; Soundbank s = null; List<SoundbankReader> providers = getSoundbankReaders(); for(int i = 0; i < providers.size(); i++) { sp = providers.get(i); s = sp.getSoundbank(stream); if( s!= null) { return s; } } throw new InvalidMidiDataException("cannot get soundbank from stream"); }
Example #10
Source File: JDK13Services.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Obtains a List containing installed instances of the providers for the * requested service. The returned List is immutable. * * @param serviceClass The type of providers requested. This should be one * of AudioFileReader.class, AudioFileWriter.class, * FormatConversionProvider.class, MixerProvider.class, * MidiDeviceProvider.class, MidiFileReader.class, * MidiFileWriter.class or SoundbankReader.class. * * @return A List of providers of the requested type. This List is * immutable. */ public static List<?> getProviders(final Class<?> serviceClass) { final List<?> providers; if (!MixerProvider.class.equals(serviceClass) && !FormatConversionProvider.class.equals(serviceClass) && !AudioFileReader.class.equals(serviceClass) && !AudioFileWriter.class.equals(serviceClass) && !MidiDeviceProvider.class.equals(serviceClass) && !SoundbankReader.class.equals(serviceClass) && !MidiFileWriter.class.equals(serviceClass) && !MidiFileReader.class.equals(serviceClass)) { providers = new ArrayList<>(0); } else { providers = JSSecurityManager.getProviders(serviceClass); } return Collections.unmodifiableList(providers); }
Example #11
Source File: MidiSystem.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Constructs a {@code Soundbank} by reading it from the specified * {@code File}. The {@code File} must point to a valid MIDI soundbank file. * * @param file the source of the sound bank data * @return the sound bank * @throws InvalidMidiDataException if the {@code File} does not point to * valid MIDI soundbank data recognized by the system * @throws IOException if an I/O error occurred when loading the soundbank * @throws NullPointerException if {@code file} is {@code null} */ public static Soundbank getSoundbank(final File file) throws InvalidMidiDataException, IOException { Objects.requireNonNull(file); SoundbankReader sp = null; Soundbank s = null; List<SoundbankReader> providers = getSoundbankReaders(); for(int i = 0; i < providers.size(); i++) { sp = providers.get(i); s = sp.getSoundbank(file); if( s!= null) { return s; } } throw new InvalidMidiDataException("cannot get soundbank from stream"); }
Example #12
Source File: MidiSystem.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Constructs a {@code Soundbank} by reading it from the specified URL. The * URL must point to a valid MIDI soundbank file. * * @param url the source of the sound bank data * @return the sound bank * @throws InvalidMidiDataException if the URL does not point to valid MIDI * soundbank data recognized by the system * @throws IOException if an I/O error occurred when loading the soundbank * @throws NullPointerException if {@code url} is {@code null} */ public static Soundbank getSoundbank(final URL url) throws InvalidMidiDataException, IOException { Objects.requireNonNull(url); SoundbankReader sp = null; Soundbank s = null; List<SoundbankReader> providers = getSoundbankReaders(); for(int i = 0; i < providers.size(); i++) { sp = providers.get(i); s = sp.getSoundbank(url); if( s!= null) { return s; } } throw new InvalidMidiDataException("cannot get soundbank from stream"); }
Example #13
Source File: MidiSystem.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Constructs a MIDI sound bank by reading it from the specified stream. The * stream must point to a valid MIDI soundbank file. In general, MIDI * soundbank providers 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 {@code IOException}. * * @param stream the source of the sound bank data * @return the sound bank * @throws InvalidMidiDataException if the stream does not point to valid * MIDI soundbank data recognized by the system * @throws IOException if an I/O error occurred when loading the soundbank * @throws NullPointerException if {@code stream} is {@code null} * @see InputStream#markSupported * @see InputStream#mark */ public static Soundbank getSoundbank(final InputStream stream) throws InvalidMidiDataException, IOException { Objects.requireNonNull(stream); SoundbankReader sp = null; Soundbank s = null; List<SoundbankReader> providers = getSoundbankReaders(); for(int i = 0; i < providers.size(); i++) { sp = providers.get(i); s = sp.getSoundbank(stream); if( s!= null) { return s; } } throw new InvalidMidiDataException("cannot get soundbank from stream"); }
Example #14
Source File: JDK13Services.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Obtains a List containing installed instances of the providers for the * requested service. The returned List is immutable. * * @param serviceClass The type of providers requested. This should be one * of AudioFileReader.class, AudioFileWriter.class, * FormatConversionProvider.class, MixerProvider.class, * MidiDeviceProvider.class, MidiFileReader.class, * MidiFileWriter.class or SoundbankReader.class. * * @return A List of providers of the requested type. This List is * immutable. */ public static List<?> getProviders(final Class<?> serviceClass) { final List<?> providers; if (!MixerProvider.class.equals(serviceClass) && !FormatConversionProvider.class.equals(serviceClass) && !AudioFileReader.class.equals(serviceClass) && !AudioFileWriter.class.equals(serviceClass) && !MidiDeviceProvider.class.equals(serviceClass) && !SoundbankReader.class.equals(serviceClass) && !MidiFileWriter.class.equals(serviceClass) && !MidiFileReader.class.equals(serviceClass)) { providers = new ArrayList<>(0); } else { providers = JSSecurityManager.getProviders(serviceClass); } return Collections.unmodifiableList(providers); }
Example #15
Source File: JDK13Services.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Obtains a List containing installed instances of the providers for the * requested service. The returned List is immutable. * * @param serviceClass The type of providers requested. This should be one * of AudioFileReader.class, AudioFileWriter.class, * FormatConversionProvider.class, MixerProvider.class, * MidiDeviceProvider.class, MidiFileReader.class, * MidiFileWriter.class or SoundbankReader.class. * * @return A List of providers of the requested type. This List is * immutable. */ public static List<?> getProviders(final Class<?> serviceClass) { final List<?> providers; if (!MixerProvider.class.equals(serviceClass) && !FormatConversionProvider.class.equals(serviceClass) && !AudioFileReader.class.equals(serviceClass) && !AudioFileWriter.class.equals(serviceClass) && !MidiDeviceProvider.class.equals(serviceClass) && !SoundbankReader.class.equals(serviceClass) && !MidiFileWriter.class.equals(serviceClass) && !MidiFileReader.class.equals(serviceClass)) { providers = new ArrayList<>(0); } else { providers = JSSecurityManager.getProviders(serviceClass); } return Collections.unmodifiableList(providers); }
Example #16
Source File: JDK13Services.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Obtains a List containing installed instances of the providers for the * requested service. The returned List is immutable. * * @param serviceClass The type of providers requested. This should be one * of AudioFileReader.class, AudioFileWriter.class, * FormatConversionProvider.class, MixerProvider.class, * MidiDeviceProvider.class, MidiFileReader.class, * MidiFileWriter.class or SoundbankReader.class. * * @return A List of providers of the requested type. This List is * immutable. */ public static List<?> getProviders(final Class<?> serviceClass) { final List<?> providers; if (!MixerProvider.class.equals(serviceClass) && !FormatConversionProvider.class.equals(serviceClass) && !AudioFileReader.class.equals(serviceClass) && !AudioFileWriter.class.equals(serviceClass) && !MidiDeviceProvider.class.equals(serviceClass) && !SoundbankReader.class.equals(serviceClass) && !MidiFileWriter.class.equals(serviceClass) && !MidiFileReader.class.equals(serviceClass)) { providers = new ArrayList<>(0); } else { providers = JSSecurityManager.getProviders(serviceClass); } return Collections.unmodifiableList(providers); }
Example #17
Source File: JDK13Services.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Obtains a List containing installed instances of the providers for the * requested service. The returned List is immutable. * * @param serviceClass The type of providers requested. This should be one * of AudioFileReader.class, AudioFileWriter.class, * FormatConversionProvider.class, MixerProvider.class, * MidiDeviceProvider.class, MidiFileReader.class, * MidiFileWriter.class or SoundbankReader.class. * * @return A List of providers of the requested type. This List is * immutable. */ public static List<?> getProviders(final Class<?> serviceClass) { final List<?> providers; if (!MixerProvider.class.equals(serviceClass) && !FormatConversionProvider.class.equals(serviceClass) && !AudioFileReader.class.equals(serviceClass) && !AudioFileWriter.class.equals(serviceClass) && !MidiDeviceProvider.class.equals(serviceClass) && !SoundbankReader.class.equals(serviceClass) && !MidiFileWriter.class.equals(serviceClass) && !MidiFileReader.class.equals(serviceClass)) { providers = new ArrayList<>(0); } else { providers = JSSecurityManager.getProviders(serviceClass); } return Collections.unmodifiableList(providers); }
Example #18
Source File: JDK13Services.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Obtains a List containing installed instances of the providers for the * requested service. The returned List is immutable. * * @param serviceClass The type of providers requested. This should be one * of AudioFileReader.class, AudioFileWriter.class, * FormatConversionProvider.class, MixerProvider.class, * MidiDeviceProvider.class, MidiFileReader.class, * MidiFileWriter.class or SoundbankReader.class. * * @return A List of providers of the requested type. This List is * immutable. */ public static List<?> getProviders(final Class<?> serviceClass) { final List<?> providers; if (!MixerProvider.class.equals(serviceClass) && !FormatConversionProvider.class.equals(serviceClass) && !AudioFileReader.class.equals(serviceClass) && !AudioFileWriter.class.equals(serviceClass) && !MidiDeviceProvider.class.equals(serviceClass) && !SoundbankReader.class.equals(serviceClass) && !MidiFileWriter.class.equals(serviceClass) && !MidiFileReader.class.equals(serviceClass)) { providers = new ArrayList<>(0); } else { providers = JSSecurityManager.getProviders(serviceClass); } return Collections.unmodifiableList(providers); }
Example #19
Source File: MidiSystem.java From Java8CN with Apache License 2.0 | 4 votes |
private static List getSoundbankReaders() { return getProviders(SoundbankReader.class); }
Example #20
Source File: MidiSystem.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
private static List getSoundbankReaders() { return getProviders(SoundbankReader.class); }
Example #21
Source File: MidiSystem.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
private static List getSoundbankReaders() { return getProviders(SoundbankReader.class); }
Example #22
Source File: MidiSystem.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
private static List getSoundbankReaders() { return getProviders(SoundbankReader.class); }
Example #23
Source File: MidiSystem.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
private static List getSoundbankReaders() { return getProviders(SoundbankReader.class); }
Example #24
Source File: MidiSystem.java From tuxguitar with GNU Lesser General Public License v2.1 | 4 votes |
private static List getSoundbankReaders() { return getProviders(SoundbankReader.class); }
Example #25
Source File: MidiSystem.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
private static List getSoundbankReaders() { return getProviders(SoundbankReader.class); }
Example #26
Source File: MidiSystem.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
private static List getSoundbankReaders() { return getProviders(SoundbankReader.class); }
Example #27
Source File: MidiSystem.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
private static List getSoundbankReaders() { return getProviders(SoundbankReader.class); }
Example #28
Source File: MidiSystem.java From hottub with GNU General Public License v2.0 | 4 votes |
private static List getSoundbankReaders() { return getProviders(SoundbankReader.class); }
Example #29
Source File: MidiSystem.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
private static List getSoundbankReaders() { return getProviders(SoundbankReader.class); }
Example #30
Source File: MidiSystem.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
private static List getSoundbankReaders() { return getProviders(SoundbankReader.class); }