com.frinika.audio.io
Class BasicAudioWriter
java.lang.Object
com.frinika.audio.io.BasicAudioWriter
- Direct Known Subclasses:
- AudioWriter
public class BasicAudioWriter
- extends java.lang.Object
minimal implementation of a wav writer. Writes bytes data.
- Author:
- pjl
Constructor Summary |
BasicAudioWriter(java.io.File file,
javax.sound.sampled.AudioFormat format)
|
Method Summary |
void |
close()
|
void |
discard()
If file ends up not being used then call this. |
protected void |
finalize()
|
java.io.File |
getFile()
|
void |
open()
|
void |
write(byte[] byteBuffer,
int offSet,
int n)
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
byteBuffer
protected byte[] byteBuffer
fis
protected java.io.RandomAccessFile fis
nChannel
protected int nChannel
BasicAudioWriter
public BasicAudioWriter(java.io.File file,
javax.sound.sampled.AudioFormat format)
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close()
discard
public void discard()
- If file ends up not being used then call this.
finalize
protected void finalize()
- Overrides:
finalize
in class java.lang.Object
getFile
public java.io.File getFile()
open
public void open()
write
public void write(byte[] byteBuffer,
int offSet,
int n)
throws java.io.IOException
- Throws:
java.io.IOException