com.groovemanager.sampled.providers
Class WavOutputStreamProvider

java.lang.Object
  extended by com.groovemanager.sampled.providers.AudioFileOutputStreamProvider
      extended by com.groovemanager.sampled.providers.WavOutputStreamProvider

public class WavOutputStreamProvider
extends AudioFileOutputStreamProvider

This AudioFileOutputStreamProvider implementation provides wave file writing services.

Author:
Manu Robledo

Field Summary
private static javax.sound.sampled.AudioFormat[] FORMATS
          Supported formats
private static java.lang.String[] PROPERTIES
          Supported properties
private static javax.sound.sampled.AudioFileFormat.Type[] TYPES
          Supported types
 
Constructor Summary
WavOutputStreamProvider()
           
 
Method Summary
protected static javax.sound.sampled.AudioFormat[] createFormats()
          Create the supported AudioFormats
 AudioFileOutputStream getAudioFileOutputStream(java.io.File f, javax.sound.sampled.AudioFileFormat.Type type, javax.sound.sampled.AudioFormat format, java.util.Map properties)
          Provide an AudioFileOutputStream
 javax.sound.sampled.AudioFormat[] getSupportedFormats()
          Get the audio formats supported by this provider
 java.lang.String[] getSupportedProperties()
          Get the property keys supported by this provider
 javax.sound.sampled.AudioFileFormat.Type[] getSupportedTypes()
          Get the audio file types supported by this provider
 boolean isFormatSupported(javax.sound.sampled.AudioFormat format)
          Ask this provider, if the given AudioFormat is supported or not
 
Methods inherited from class com.groovemanager.sampled.providers.AudioFileOutputStreamProvider
isPropertySupported, isTypeSupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORMATS

private static final javax.sound.sampled.AudioFormat[] FORMATS
Supported formats


PROPERTIES

private static final java.lang.String[] PROPERTIES
Supported properties


TYPES

private static final javax.sound.sampled.AudioFileFormat.Type[] TYPES
Supported types

Constructor Detail

WavOutputStreamProvider

public WavOutputStreamProvider()
Method Detail

createFormats

protected static javax.sound.sampled.AudioFormat[] createFormats()
Create the supported AudioFormats

Returns:
The supported AudioFormats

getAudioFileOutputStream

public AudioFileOutputStream getAudioFileOutputStream(java.io.File f,
                                                      javax.sound.sampled.AudioFileFormat.Type type,
                                                      javax.sound.sampled.AudioFormat format,
                                                      java.util.Map properties)
                                               throws javax.sound.sampled.UnsupportedAudioFileException,
                                                      java.io.IOException
Description copied from class: AudioFileOutputStreamProvider
Provide an AudioFileOutputStream

Specified by:
getAudioFileOutputStream in class AudioFileOutputStreamProvider
Parameters:
f - The file to write to
type - The audio file type to write
format - The AudioFormat to write
properties - Map of properties to write into the file, if supported
Returns:
An AudioFileOutputStream matching the given parameters
Throws:
java.io.IOException - If an I/O Error occured during creation of the OutputStream
javax.sound.sampled.UnsupportedAudioFileException - If the audio file type is not supported
See Also:
AudioFileOutputStreamProvider.getAudioFileOutputStream(java.io.File, javax.sound.sampled.AudioFileFormat.Type, javax.sound.sampled.AudioFormat, java.util.Map)

getSupportedFormats

public javax.sound.sampled.AudioFormat[] getSupportedFormats()
Description copied from class: AudioFileOutputStreamProvider
Get the audio formats supported by this provider

Specified by:
getSupportedFormats in class AudioFileOutputStreamProvider
Returns:
The audio formats supported by this provider
See Also:
AudioFileOutputStreamProvider.getSupportedFormats()

getSupportedProperties

public java.lang.String[] getSupportedProperties()
Description copied from class: AudioFileOutputStreamProvider
Get the property keys supported by this provider

Specified by:
getSupportedProperties in class AudioFileOutputStreamProvider
Returns:
The property keys supported by this provider
See Also:
AudioFileOutputStreamProvider.getSupportedProperties()

getSupportedTypes

public javax.sound.sampled.AudioFileFormat.Type[] getSupportedTypes()
Description copied from class: AudioFileOutputStreamProvider
Get the audio file types supported by this provider

Specified by:
getSupportedTypes in class AudioFileOutputStreamProvider
Returns:
The audio file types supported by this provider
See Also:
AudioFileOutputStreamProvider.getSupportedTypes()

isFormatSupported

public boolean isFormatSupported(javax.sound.sampled.AudioFormat format)
Description copied from class: AudioFileOutputStreamProvider
Ask this provider, if the given AudioFormat is supported or not

Overrides:
isFormatSupported in class AudioFileOutputStreamProvider
Parameters:
format - The AudioFormat to ask for
Returns:
true, if the given format is supported, false otherwise.
See Also:
AudioFileOutputStreamProvider.isFormatSupported(javax.sound.sampled.AudioFormat)