javax.sound.sampled.spi
public abstract class AudioFileWriter extends Object
Constructor and Description |
---|
AudioFileWriter()
Creat a new audio file writer.
|
Modifier and Type | Method and Description |
---|---|
abstract AudioFileFormat.Type[] |
getAudioFileTypes()
Return an array of all audio file format types supported by this
provider.
|
abstract AudioFileFormat.Type[] |
getAudioFileTypes(AudioInputStream ais)
Return an array of all the audio file format types supported by this
provider, which can be written given the input stream.
|
boolean |
isFileTypeSupported(AudioFileFormat.Type type)
Return true if the indicated type is supported by this provider.
|
boolean |
isFileTypeSupported(AudioFileFormat.Type type,
AudioInputStream ais)
Return true if the indicated type is supported by this provider,
and can be written from the given audio input stream.
|
abstract int |
write(AudioInputStream ais,
AudioFileFormat.Type type,
File out)
Write audio data to a file.
|
abstract int |
write(AudioInputStream ais,
AudioFileFormat.Type type,
OutputStream os)
Write audio data to an output stream.
|
public AudioFileWriter()
public abstract AudioFileFormat.Type[] getAudioFileTypes()
public abstract AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream ais)
ais
- the audio input streampublic boolean isFileTypeSupported(AudioFileFormat.Type type)
type
- the audio file format typepublic boolean isFileTypeSupported(AudioFileFormat.Type type, AudioInputStream ais)
type
- the audio file format typeais
- the audio input stream to writepublic abstract int write(AudioInputStream ais, AudioFileFormat.Type type, File out) throws IOException
ais
- the audio input stream to writetype
- the desired audio file format typeout
- the file to write toIOException
- if an I/O error occurs when writingpublic abstract int write(AudioInputStream ais, AudioFileFormat.Type type, OutputStream os) throws IOException
ais
- the audio input stream to writetype
- the desired audio file format typeos
- the output streamIOException
- if an I/O error occurs when writing