org.xiph.speex.spi
Class SpeexAudioFileWriter
AudioFileWriter
org.xiph.speex.spi.SpeexAudioFileWriter
public class SpeexAudioFileWriter
extends AudioFileWriter
Provider for Speex audio file writing services.
This implementation can write Speex audio files from an audio stream.
- Marc Gimpel, Wimba S.A. (mgimpel@horizonwimba.com)
AudioFileFormat.Type[] | getAudioFileTypes() - Obtains the file types for which file writing support is provided by this audio file writer.
|
AudioFileFormat.Type[] | getAudioFileTypes(AudioInputStream stream) - Obtains the file types that this audio file writer can write from the
audio input stream specified.
|
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.
|
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.
|
private int | write(AudioInputStream stream, OutputStream out) - Writes a stream of bytes representing an audio file of the file type
indicated to the output stream provided.
|
NO_FORMAT
public static final AudioFileFormat.Type[] NO_FORMAT
SPEEX_FORMAT
public static final AudioFileFormat.Type[] SPEEX_FORMAT
getAudioFileTypes
public AudioFileFormat.Type[] getAudioFileTypes()
Obtains the file types for which file writing support is provided by this audio file writer.
- array of file types. If no file types are supported, an array of length 0 is returned.
getAudioFileTypes
public AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream)
Obtains the file types that this audio file writer can write from the
audio input stream specified.
stream
- - the audio input stream for which audio file type support
is queried.
- array of file types. If no file types are supported, an array of
length 0 is returned.
write
public int write(AudioInputStream stream,
AudioFileFormat.Type fileType,
File out)
throws IOException
Writes a stream of bytes representing an audio file of the file format
indicated to the external file provided.
stream
- - the audio input stream containing audio data to be written
to the file.fileType
- - file type to be written to the file.out
- - external file to which the file data should be written.
- the number of bytes written to the file.
write
public int write(AudioInputStream stream,
AudioFileFormat.Type fileType,
OutputStream out)
throws IOException
Writes a stream of bytes representing an audio file of the file type
indicated to the output stream provided. Some file types require that the
length be written into the file header, and cannot be written from start
to finish unless the length is known in advance.
An attempt to write such a file type will fail with an 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 stream.fileType
- - file type to be written to the output stream.out
- - stream to which the file data should be written.
- the number of bytes written to the output stream.
write
private int write(AudioInputStream stream,
OutputStream out)
throws IOException
Writes a stream of bytes representing an audio file of the file type
indicated to the output stream provided.
stream
- - the audio input stream containing audio data to be written
to the output stream.out
- - stream to which the file data should be written.
- the number of bytes written to the output stream.
Copyright © 1999-2004 Wimba S.A. All Rights Reserved.