com.groovemanager.sampled.providers
Class AudioFileOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by com.groovemanager.sampled.providers.AudioFileOutputStream
All Implemented Interfaces:
java.io.Closeable
Direct Known Subclasses:
WavFileOutputStream

public abstract class AudioFileOutputStream
extends java.io.OutputStream

An AudioFileOutputStream is an OutputStream for writing a soecific type of audio file.

Author:
Manu Robledo

Field Summary
protected  javax.sound.sampled.AudioFormat format
          The AudioFormat in which to write the file
protected  java.io.File outputFile
          The file to write to
protected  java.util.Map properties
          Map of additional properties to write into the file, if supported
protected  javax.sound.sampled.AudioFileFormat.Type type
          The audio file type to write
 
Constructor Summary
AudioFileOutputStream(java.io.File f, javax.sound.sampled.AudioFormat format, javax.sound.sampled.AudioFileFormat.Type t, java.util.Map properties)
          Construct a new AudioFileOutputStream
 
Method Summary
 javax.sound.sampled.AudioFormat getFormat()
          Get the AudioFormat of this AudioFileOutputStream
 java.io.File getOutputFile()
          Get the file into which this stream writes
 javax.sound.sampled.AudioFileFormat.Type getType()
          Get the audio file type of this stream
 
Methods inherited from class java.io.OutputStream
close, flush, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

format

protected final javax.sound.sampled.AudioFormat format
The AudioFormat in which to write the file


outputFile

protected final java.io.File outputFile
The file to write to


properties

protected final java.util.Map properties
Map of additional properties to write into the file, if supported


type

protected final javax.sound.sampled.AudioFileFormat.Type type
The audio file type to write

Constructor Detail

AudioFileOutputStream

public AudioFileOutputStream(java.io.File f,
                             javax.sound.sampled.AudioFormat format,
                             javax.sound.sampled.AudioFileFormat.Type t,
                             java.util.Map properties)
Construct a new AudioFileOutputStream

Parameters:
f - The file to write to
format - The format in which the audio data should be written into the file
t - The audio file type to write
properties - Map of additional properties to write into the file, if supported
Method Detail

getFormat

public javax.sound.sampled.AudioFormat getFormat()
Get the AudioFormat of this AudioFileOutputStream

Returns:
This streamīs AudioFormat

getOutputFile

public java.io.File getOutputFile()
Get the file into which this stream writes

Returns:
The file being written by this stream

getType

public javax.sound.sampled.AudioFileFormat.Type getType()
Get the audio file type of this stream

Returns:
This streamīs AudioFileFormat.Type