public abstract class AudioFileWriter extends Object
Constructor and Description |
---|
AudioFileWriter() |
Modifier and Type | Method and 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(AudioInputStream stream)
Obtains the file types that this audio file writer can write from the
audio input stream specified.
|
boolean |
isFileTypeSupported(AudioFileFormat.Type fileType)
Indicates whether file writing support for the specified file type is provided
by this audio file writer.
|
boolean |
isFileTypeSupported(AudioFileFormat.Type fileType,
AudioInputStream stream)
Indicates whether an audio file of the type specified can be written
from the audio input stream indicated.
|
abstract int |
write(AudioInputStream stream,
AudioFileFormat.Type fileType,
File out)
Writes a stream of bytes representing an audio file of the file format
indicated to the external file provided.
|
abstract int |
write(AudioInputStream stream,
AudioFileFormat.Type fileType,
OutputStream out)
Writes a stream of bytes representing an audio file of the file type
indicated to the output stream provided.
|
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
public abstract AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream)
stream
- the audio input stream for which audio file type support
is queriedpublic 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
public abstract int write(AudioInputStream stream, AudioFileFormat.Type fileType, OutputStream out) throws IOException
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 systemisFileTypeSupported(AudioFileFormat.Type, AudioInputStream)
,
getAudioFileTypes()
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 systemisFileTypeSupported(javax.sound.sampled.AudioFileFormat.Type)
,
getAudioFileTypes()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2022, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.