public abstract class AudioFileWriter extends Object
Modifier | Constructor | Description |
---|---|---|
protected |
Constructor for subclasses to call. |
Modifier and Type | Method | Description |
---|---|---|
abstract AudioFileFormat.Type[] |
getAudioFileTypes() |
Obtains the file types for which file writing support is provided by this audio file writer. |
abstract AudioFileFormat.Type[] |
getAudioFileTypes |
Obtains the file types that this audio file writer can write from the audio input stream specified. |
boolean |
isFileTypeSupported |
Indicates whether file writing support for the specified file type is provided by this audio file writer. |
boolean |
isFileTypeSupported |
Indicates whether an audio file of the type specified can be written from the audio input stream indicated. |
abstract int |
write |
Writes a stream of bytes representing an audio file of the file format indicated to the external file provided. |
abstract int |
write |
Writes a stream of bytes representing an audio file of the file type indicated to the output stream provided. |
protected AudioFileWriter()
public abstract AudioFileFormat.Type[] getAudioFileTypes()
public boolean isFileTypeSupported(AudioFileFormat.Type fileType)
fileType
- the file type for which write capabilities are queriedtrue
if the file type is supported, otherwise false
NullPointerException
- if fileType
is null
public abstract AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream)
stream
- the audio input stream for which audio file type support is queriedNullPointerException
- if stream
is null
public boolean isFileTypeSupported(AudioFileFormat.Type fileType, AudioInputStream stream)
fileType
- file type for which write capabilities are queriedstream
- for which file writing support is queriedtrue
if the file type is supported for this audio input stream, otherwise false
NullPointerException
- if fileType
or stream
are null
public abstract int write(AudioInputStream stream, AudioFileFormat.Type fileType, OutputStream out) throws IOException
IOException
if the length in the audio file format is AudioSystem.NOT_SPECIFIED
.stream
- the audio input stream containing audio data to be written to the output streamfileType
- file type to be written to the output streamout
- stream to which the file data should be writtenIOException
- if an I/O exception occursIllegalArgumentException
- if the file type is not supported by the systemNullPointerException
- if stream
or fileType
or out
are null
public abstract int write(AudioInputStream stream, AudioFileFormat.Type fileType, File out) throws IOException
stream
- the audio input stream containing audio data to be written to the filefileType
- file type to be written to the fileout
- external file to which the file data should be writtenIOException
- if an I/O exception occursIllegalArgumentException
- if the file format is not supported by the systemNullPointerException
- if stream
or fileType
or out
are null
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/sound/sampled/spi/AudioFileWriter.html