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

The following examples show how to use javax.sound.sampled.spi.AudioFileWriter#isFileTypeSupported() . 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 5 votes vote down vote up
/**
 * Indicates whether file writing support for the specified file type is provided
 * by the system.
 * @param fileType the file type for which write capabilities are queried
 * @return <code>true</code> if the file type is supported,
 * otherwise <code>false</code>
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType) {

    List providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        if (writer.isFileTypeSupported(fileType)) {
            return true;
        }
    }
    return false;
}
 
Example 2
Source File: AudioSystem.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Indicates whether an audio file of the specified file type can be written
 * from the indicated audio input stream.
 * @param fileType the file type for which write capabilities are queried
 * @param stream the stream for which file-writing support is queried
 * @return <code>true</code> if the file type is supported for this audio input stream,
 * otherwise <code>false</code>
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType,
                                          AudioInputStream stream) {

    List providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        if(writer.isFileTypeSupported(fileType, stream)) {
            return true;
        }
    }
    return false;
}
 
Example 3
Source File: AudioSystem.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Indicates whether file writing support for the specified file type is provided
 * by the system.
 * @param fileType the file type for which write capabilities are queried
 * @return <code>true</code> if the file type is supported,
 * otherwise <code>false</code>
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType) {

    List providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        if (writer.isFileTypeSupported(fileType)) {
            return true;
        }
    }
    return false;
}
 
Example 4
Source File: AudioSystem.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Indicates whether an audio file of the specified file type can be written
 * from the indicated audio input stream.
 *
 * @param  fileType the file type for which write capabilities are queried
 * @param  stream the stream for which file-writing support is queried
 * @return {@code true} if the file type is supported for this audio input
 *         stream, otherwise {@code false}
 * @throws NullPointerException if {@code fileType} or {@code stream} are
 *         {@code null}
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType,
                                          AudioInputStream stream) {
    Objects.requireNonNull(fileType);
    Objects.requireNonNull(stream);
    List<AudioFileWriter> providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = providers.get(i);
        if(writer.isFileTypeSupported(fileType, stream)) {
            return true;
        }
    }
    return false;
}
 
Example 5
Source File: AudioSystem.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Indicates whether file writing support for the specified file type is
 * provided by the system.
 *
 * @param  fileType the file type for which write capabilities are queried
 * @return {@code true} if the file type is supported, otherwise
 *         {@code false}
 * @throws NullPointerException if {@code fileType} is {@code null}
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType) {
    Objects.requireNonNull(fileType);
    List<AudioFileWriter> providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = providers.get(i);
        if (writer.isFileTypeSupported(fileType)) {
            return true;
        }
    }
    return false;
}
 
Example 6
Source File: AudioSystem.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Indicates whether an audio file of the specified file type can be written
 * from the indicated audio input stream.
 *
 * @param  fileType the file type for which write capabilities are queried
 * @param  stream the stream for which file-writing support is queried
 * @return {@code true} if the file type is supported for this audio input
 *         stream, otherwise {@code false}
 * @throws NullPointerException if {@code fileType} or {@code stream} are
 *         {@code null}
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType,
                                          AudioInputStream stream) {
    Objects.requireNonNull(fileType);
    Objects.requireNonNull(stream);
    List<AudioFileWriter> providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = providers.get(i);
        if(writer.isFileTypeSupported(fileType, stream)) {
            return true;
        }
    }
    return false;
}
 
Example 7
Source File: AudioSystem.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Indicates whether file writing support for the specified file type is
 * provided by the system.
 *
 * @param  fileType the file type for which write capabilities are queried
 * @return {@code true} if the file type is supported, otherwise
 *         {@code false}
 * @throws NullPointerException if {@code fileType} is {@code null}
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType) {
    Objects.requireNonNull(fileType);
    List<AudioFileWriter> providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = providers.get(i);
        if (writer.isFileTypeSupported(fileType)) {
            return true;
        }
    }
    return false;
}
 
Example 8
Source File: AudioSystem.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Indicates whether an audio file of the specified file type can be written
 * from the indicated audio input stream.
 * @param fileType the file type for which write capabilities are queried
 * @param stream the stream for which file-writing support is queried
 * @return <code>true</code> if the file type is supported for this audio input stream,
 * otherwise <code>false</code>
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType,
                                          AudioInputStream stream) {

    List providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        if(writer.isFileTypeSupported(fileType, stream)) {
            return true;
        }
    }
    return false;
}
 
Example 9
Source File: AudioSystem.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Indicates whether file writing support for the specified file type is provided
 * by the system.
 * @param fileType the file type for which write capabilities are queried
 * @return <code>true</code> if the file type is supported,
 * otherwise <code>false</code>
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType) {

    List providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        if (writer.isFileTypeSupported(fileType)) {
            return true;
        }
    }
    return false;
}
 
Example 10
Source File: AudioSystem.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Indicates whether an audio file of the specified file type can be written
 * from the indicated audio input stream.
 * @param fileType the file type for which write capabilities are queried
 * @param stream the stream for which file-writing support is queried
 * @return <code>true</code> if the file type is supported for this audio input stream,
 * otherwise <code>false</code>
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType,
                                          AudioInputStream stream) {

    List providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        if(writer.isFileTypeSupported(fileType, stream)) {
            return true;
        }
    }
    return false;
}
 
Example 11
Source File: AudioSystem.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Indicates whether file writing support for the specified file type is provided
 * by the system.
 * @param fileType the file type for which write capabilities are queried
 * @return <code>true</code> if the file type is supported,
 * otherwise <code>false</code>
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType) {

    List providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        if (writer.isFileTypeSupported(fileType)) {
            return true;
        }
    }
    return false;
}
 
Example 12
Source File: AudioSystem.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Indicates whether an audio file of the specified file type can be written
 * from the indicated audio input stream.
 * @param fileType the file type for which write capabilities are queried
 * @param stream the stream for which file-writing support is queried
 * @return <code>true</code> if the file type is supported for this audio input stream,
 * otherwise <code>false</code>
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType,
                                          AudioInputStream stream) {

    List providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        if(writer.isFileTypeSupported(fileType, stream)) {
            return true;
        }
    }
    return false;
}
 
Example 13
Source File: AudioSystem.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Indicates whether file writing support for the specified file type is provided
 * by the system.
 * @param fileType the file type for which write capabilities are queried
 * @return <code>true</code> if the file type is supported,
 * otherwise <code>false</code>
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType) {

    List providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        if (writer.isFileTypeSupported(fileType)) {
            return true;
        }
    }
    return false;
}
 
Example 14
Source File: AudioSystem.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Indicates whether an audio file of the specified file type can be written
 * from the indicated audio input stream.
 * @param fileType the file type for which write capabilities are queried
 * @param stream the stream for which file-writing support is queried
 * @return <code>true</code> if the file type is supported for this audio input stream,
 * otherwise <code>false</code>
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType,
                                          AudioInputStream stream) {

    List providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        if(writer.isFileTypeSupported(fileType, stream)) {
            return true;
        }
    }
    return false;
}
 
Example 15
Source File: AudioSystem.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Indicates whether file writing support for the specified file type is provided
 * by the system.
 * @param fileType the file type for which write capabilities are queried
 * @return <code>true</code> if the file type is supported,
 * otherwise <code>false</code>
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType) {

    List providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        if (writer.isFileTypeSupported(fileType)) {
            return true;
        }
    }
    return false;
}
 
Example 16
Source File: AudioSystem.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Indicates whether an audio file of the specified file type can be written
 * from the indicated audio input stream.
 * @param fileType the file type for which write capabilities are queried
 * @param stream the stream for which file-writing support is queried
 * @return <code>true</code> if the file type is supported for this audio input stream,
 * otherwise <code>false</code>
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType,
                                          AudioInputStream stream) {

    List providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        if(writer.isFileTypeSupported(fileType, stream)) {
            return true;
        }
    }
    return false;
}
 
Example 17
Source File: AudioSystem.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Indicates whether file writing support for the specified file type is provided
 * by the system.
 * @param fileType the file type for which write capabilities are queried
 * @return <code>true</code> if the file type is supported,
 * otherwise <code>false</code>
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType) {

    List providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        if (writer.isFileTypeSupported(fileType)) {
            return true;
        }
    }
    return false;
}
 
Example 18
Source File: AudioSystem.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Indicates whether an audio file of the specified file type can be written
 * from the indicated audio input stream.
 * @param fileType the file type for which write capabilities are queried
 * @param stream the stream for which file-writing support is queried
 * @return <code>true</code> if the file type is supported for this audio input stream,
 * otherwise <code>false</code>
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType,
                                          AudioInputStream stream) {

    List providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        if(writer.isFileTypeSupported(fileType, stream)) {
            return true;
        }
    }
    return false;
}
 
Example 19
Source File: AudioSystem.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Indicates whether file writing support for the specified file type is provided
 * by the system.
 * @param fileType the file type for which write capabilities are queried
 * @return <code>true</code> if the file type is supported,
 * otherwise <code>false</code>
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType) {

    List providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        if (writer.isFileTypeSupported(fileType)) {
            return true;
        }
    }
    return false;
}
 
Example 20
Source File: AudioSystem.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Indicates whether an audio file of the specified file type can be written
 * from the indicated audio input stream.
 * @param fileType the file type for which write capabilities are queried
 * @param stream the stream for which file-writing support is queried
 * @return <code>true</code> if the file type is supported for this audio input stream,
 * otherwise <code>false</code>
 */
public static boolean isFileTypeSupported(AudioFileFormat.Type fileType,
                                          AudioInputStream stream) {

    List providers = getAudioFileWriters();

    for(int i=0; i < providers.size(); i++) {
        AudioFileWriter writer = (AudioFileWriter) providers.get(i);
        if(writer.isFileTypeSupported(fileType, stream)) {
            return true;
        }
    }
    return false;
}