Package org.xiph.speex
Class RawWriter
- java.lang.Object
-
- org.xiph.speex.AudioFileWriter
-
- org.xiph.speex.RawWriter
-
public class RawWriter extends AudioFileWriter
Raw Audio File Writer.- Version:
- $Revision: 1.2 $
- Author:
- Marc Gimpel, Wimba S.A. (mgimpel@horizonwimba.com)
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.OutputStreamout
-
Constructor Summary
Constructors Constructor Description RawWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the output file.voidopen(java.io.File file)Open the output file.voidopen(java.lang.String filename)Open the output file.voidwriteHeader(java.lang.String comment)Writes the header pages that start the Ogg Speex file.voidwritePacket(byte[] data, int offset, int len)Writes a packet of audio.-
Methods inherited from class org.xiph.speex.AudioFileWriter
buildOggPageHeader, buildSpeexComment, buildSpeexHeader, writeInt, writeInt, writeInt, writeLong, writeLong, writeOggPageHeader, writeShort, writeShort, writeShort, writeSpeexComment, writeSpeexHeader, writeString
-
-
-
-
Method Detail
-
close
public void close() throws java.io.IOExceptionCloses the output file.- Specified by:
closein classAudioFileWriter- Throws:
java.io.IOException- if there was an exception closing the Audio Writer.
-
open
public void open(java.io.File file) throws java.io.IOExceptionOpen the output file.- Specified by:
openin classAudioFileWriter- Parameters:
file- - file to open.- Throws:
java.io.IOException- if there was an exception opening the Audio Writer.
-
open
public void open(java.lang.String filename) throws java.io.IOExceptionOpen the output file.- Specified by:
openin classAudioFileWriter- Parameters:
filename- - file to open.- Throws:
java.io.IOException- if there was an exception opening the Audio Writer.
-
writeHeader
public void writeHeader(java.lang.String comment) throws java.io.IOExceptionWrites the header pages that start the Ogg Speex file. Prepares file for data to be written.- Specified by:
writeHeaderin classAudioFileWriter- 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.IOExceptionWrites a packet of audio.- Specified by:
writePacketin classAudioFileWriter- Parameters:
data- audio dataoffset- the offset from which to start reading the data.len- the length of data to read.- Throws:
java.io.IOException
-
-