org.xiph.speex
Class RawWriter

java.lang.Object
  extended byorg.xiph.speex.AudioFileWriter
      extended byorg.xiph.speex.RawWriter

public class RawWriter
extends AudioFileWriter

Raw Audio File Writer.

Version:
$Revision: 1.1 $
Author:
Marc Gimpel, Wimba S.A. (marc@wimba.com)

Field Summary
private  java.io.OutputStream out
           
 
Constructor Summary
RawWriter()
           
 
Method Summary
 void close()
          Closes the output file.
 void open(java.lang.String filename)
          Open the output file.
 void writeHeader(java.lang.String comment)
          Writes the header pages that start the Ogg Speex file.
 void writePacket(byte[] data, int offset, int len)
          Writes a packet of audio.
 
Methods inherited from class org.xiph.speex.AudioFileWriter
writeInt, writeInt, writeLong, writeShort, writeShort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

private java.io.OutputStream out
Constructor Detail

RawWriter

public RawWriter()
Method Detail

close

public void close()
           throws java.io.IOException
Closes the output file.

Specified by:
close in class AudioFileWriter
Throws:
java.io.IOException

open

public void open(java.lang.String filename)
          throws java.io.IOException
Open the output file.

Specified by:
open in class AudioFileWriter
Parameters:
filename - - file to open.
Throws:
java.io.IOException

writeHeader

public void writeHeader(java.lang.String comment)
                 throws java.io.IOException
Writes the header pages that start the Ogg Speex file. Prepares file for data to be written.

Specified by:
writeHeader in class AudioFileWriter
Parameters:
comment - description to be included in the header.
Throws:
java.io.IOException

writePacket

public void writePacket(byte[] data,
                        int offset,
                        int len)
                 throws java.io.IOException
Writes a packet of audio.

Specified by:
writePacket in class AudioFileWriter
Parameters:
data - audio data
offset - the offset from which to start reading the data.
len - the length of data to read.
Throws:
java.io.IOException


Copyright © 1999-2004 Wimba S.A. All Rights Reserved.