Java Code Examples for javax.sound.sampled.spi.AudioFileWriter#getAudioFileTypes()

The following examples show how to use javax.sound.sampled.spi.AudioFileWriter#getAudioFileTypes() . 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: AudioSystem.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Obtains the file types for which file writing support is provided by the system.
 * @return array of unique file types.  If no file types are supported,
 * an array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes() {
    List providers = getAudioFileWriters();
    Set returnTypesSet = new HashSet();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes();
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] = (AudioFileFormat.Type[])
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 2
Source File: AudioSystem.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Obtains the file types that the system can write from the
 * audio input stream specified.
 * @param stream the audio input stream for which audio file type support
 * is queried
 * @return array of file types.  If no file types are supported,
 * an array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream) {
    List providers = getAudioFileWriters();
    Set returnTypesSet = new HashSet();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes(stream);
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] = (AudioFileFormat.Type[])
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 3
Source File: AudioSystem.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Obtains the file types for which file writing support is provided by the system.
 * @return array of unique file types.  If no file types are supported,
 * an array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes() {
    List providers = getAudioFileWriters();
    Set returnTypesSet = new HashSet();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes();
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] = (AudioFileFormat.Type[])
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 4
Source File: AudioSystem.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Obtains the file types that the system can write from the audio input
 * stream specified.
 *
 * @param  stream the audio input stream for which audio file type
 *         support is queried
 * @return array of file types. If no file types are supported, an array of
 *         length 0 is returned.
 * @throws NullPointerException if {@code stream} is {@code null}
 */
public static AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream) {
    Objects.requireNonNull(stream);
    List<AudioFileWriter> providers = getAudioFileWriters();
    Set<AudioFileFormat.Type> returnTypesSet = new HashSet<>();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes(stream);
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] =
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 5
Source File: AudioSystem.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Obtains the file types for which file writing support is provided by the
 * system.
 *
 * @return array of unique file types. If no file types are supported, an
 *         array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes() {
    List<AudioFileWriter> providers = getAudioFileWriters();
    Set<AudioFileFormat.Type> returnTypesSet = new HashSet<>();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes();
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] =
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 6
Source File: AudioSystem.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/**
 * Obtains the file types that the system can write from the audio input
 * stream specified.
 *
 * @param  stream the audio input stream for which audio file type support
 *         is queried
 * @return array of file types. If no file types are supported, an array of
 *         length 0 is returned.
 * @throws NullPointerException if {@code stream} is {@code null}
 */
public static AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream) {
    Objects.requireNonNull(stream);
    List<AudioFileWriter> providers = getAudioFileWriters();
    Set<AudioFileFormat.Type> returnTypesSet = new HashSet<>();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes(stream);
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type[] returnTypes =
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 7
Source File: AudioSystem.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/**
 * Obtains the file types for which file writing support is provided by the
 * system.
 *
 * @return array of unique file types. If no file types are supported, an
 *         array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes() {
    List<AudioFileWriter> providers = getAudioFileWriters();
    Set<AudioFileFormat.Type> returnTypesSet = new HashSet<>();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes();
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type[] returnTypes =
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 8
Source File: AudioSystem.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Obtains the file types that the system can write from the
 * audio input stream specified.
 * @param stream the audio input stream for which audio file type support
 * is queried
 * @return array of file types.  If no file types are supported,
 * an array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream) {
    List providers = getAudioFileWriters();
    Set returnTypesSet = new HashSet();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes(stream);
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] = (AudioFileFormat.Type[])
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 9
Source File: AudioSystem.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Obtains the file types for which file writing support is provided by the system.
 * @return array of unique file types.  If no file types are supported,
 * an array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes() {
    List providers = getAudioFileWriters();
    Set returnTypesSet = new HashSet();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes();
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] = (AudioFileFormat.Type[])
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 10
Source File: AudioSystem.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Obtains the file types that the system can write from the
 * audio input stream specified.
 * @param stream the audio input stream for which audio file type support
 * is queried
 * @return array of file types.  If no file types are supported,
 * an array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream) {
    List providers = getAudioFileWriters();
    Set returnTypesSet = new HashSet();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes(stream);
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] = (AudioFileFormat.Type[])
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 11
Source File: AudioSystem.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Obtains the file types that the system can write from the
 * audio input stream specified.
 * @param stream the audio input stream for which audio file type support
 * is queried
 * @return array of file types.  If no file types are supported,
 * an array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream) {
    List providers = getAudioFileWriters();
    Set returnTypesSet = new HashSet();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes(stream);
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] = (AudioFileFormat.Type[])
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 12
Source File: AudioSystem.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Obtains the file types for which file writing support is provided by the system.
 * @return array of unique file types.  If no file types are supported,
 * an array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes() {
    List providers = getAudioFileWriters();
    Set returnTypesSet = new HashSet();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes();
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] = (AudioFileFormat.Type[])
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 13
Source File: AudioSystem.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Obtains the file types that the system can write from the
 * audio input stream specified.
 * @param stream the audio input stream for which audio file type support
 * is queried
 * @return array of file types.  If no file types are supported,
 * an array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream) {
    List providers = getAudioFileWriters();
    Set returnTypesSet = new HashSet();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes(stream);
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] = (AudioFileFormat.Type[])
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 14
Source File: AudioSystem.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Obtains the file types for which file writing support is provided by the system.
 * @return array of unique file types.  If no file types are supported,
 * an array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes() {
    List providers = getAudioFileWriters();
    Set returnTypesSet = new HashSet();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes();
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] = (AudioFileFormat.Type[])
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 15
Source File: AudioSystem.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Obtains the file types that the system can write from the
 * audio input stream specified.
 * @param stream the audio input stream for which audio file type support
 * is queried
 * @return array of file types.  If no file types are supported,
 * an array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream) {
    List providers = getAudioFileWriters();
    Set returnTypesSet = new HashSet();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes(stream);
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] = (AudioFileFormat.Type[])
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 16
Source File: AudioSystem.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Obtains the file types for which file writing support is provided by the system.
 * @return array of unique file types.  If no file types are supported,
 * an array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes() {
    List providers = getAudioFileWriters();
    Set returnTypesSet = new HashSet();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes();
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] = (AudioFileFormat.Type[])
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 17
Source File: AudioSystem.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Obtains the file types that the system can write from the
 * audio input stream specified.
 * @param stream the audio input stream for which audio file type support
 * is queried
 * @return array of file types.  If no file types are supported,
 * an array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream) {
    List providers = getAudioFileWriters();
    Set returnTypesSet = new HashSet();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes(stream);
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] = (AudioFileFormat.Type[])
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 18
Source File: AudioSystem.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Obtains the file types for which file writing support is provided by the system.
 * @return array of unique file types.  If no file types are supported,
 * an array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes() {
    List providers = getAudioFileWriters();
    Set returnTypesSet = new HashSet();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes();
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] = (AudioFileFormat.Type[])
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 19
Source File: AudioSystem.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * Obtains the file types that the system can write from the
 * audio input stream specified.
 * @param stream the audio input stream for which audio file type support
 * is queried
 * @return array of file types.  If no file types are supported,
 * an array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream) {
    List providers = getAudioFileWriters();
    Set returnTypesSet = new HashSet();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes(stream);
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] = (AudioFileFormat.Type[])
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}
 
Example 20
Source File: AudioSystem.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Obtains the file types for which file writing support is provided by the system.
 * @return array of unique file types.  If no file types are supported,
 * an array of length 0 is returned.
 */
public static AudioFileFormat.Type[] getAudioFileTypes() {
    List providers = getAudioFileWriters();
    Set returnTypesSet = new HashSet();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes();
        for(int j=0; j < fileTypes.length; j++) {
            returnTypesSet.add(fileTypes[j]);
        }
    }
    AudioFileFormat.Type returnTypes[] = (AudioFileFormat.Type[])
        returnTypesSet.toArray(new AudioFileFormat.Type[0]);
    return returnTypes;
}