org.kc7bfi.jflac.util
Class WavWriter

java.lang.Object
  extended by org.kc7bfi.jflac.util.WavWriter

public class WavWriter
extends java.lang.Object

Utility class for writing WAV files.


Constructor Summary
WavWriter(java.io.DataOutput os)
          The constructor.
WavWriter(java.io.DataOutput os, StreamInfo streamInfo)
          The constructor.
WavWriter(java.io.OutputStream os)
          The constructor.
WavWriter(java.io.OutputStream os, StreamInfo streamInfo)
          The constructor.
 
Method Summary
 void writeFrame(Frame frame, ChannelData[] channelData)
          Write a WAV frame record.
 void writeHeader()
          Write a WAV file header.
 void writeHeader(StreamInfo streamInfo)
          Write a WAV file header.
 void writePCM(ByteData space)
          Write the PCM data.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WavWriter

public WavWriter(java.io.DataOutput os,
                 StreamInfo streamInfo)
The constructor.

Parameters:
os - The output sream
streamInfo - The FLAC stream info

WavWriter

public WavWriter(java.io.DataOutput os)
The constructor.

Parameters:
os - The output sream

WavWriter

public WavWriter(java.io.OutputStream os,
                 StreamInfo streamInfo)
The constructor.

Parameters:
os - The output sream
streamInfo - The FLAC stream info

WavWriter

public WavWriter(java.io.OutputStream os)
The constructor.

Parameters:
os - The output sream
Method Detail

writeHeader

public void writeHeader()
                 throws java.io.IOException
Write a WAV file header.

Throws:
java.io.IOException - Thrown if error writing to output string.

writeHeader

public void writeHeader(StreamInfo streamInfo)
                 throws java.io.IOException
Write a WAV file header.

Parameters:
streamInfo - The FLAC stream info
Throws:
java.io.IOException - Thrown if error writing to output string.

writeFrame

public void writeFrame(Frame frame,
                       ChannelData[] channelData)
                throws java.io.IOException
Write a WAV frame record.

Parameters:
frame - The FLAC frame
channelData - The decoded channel data
Throws:
java.io.IOException - Thrown if error writing to output channel

writePCM

public void writePCM(ByteData space)
              throws java.io.IOException
Write the PCM data.

Parameters:
space - The PCM data
Throws:
java.io.IOException - Thrown if error writing to file