org.tritonus.sampled.file
Class AuAudioOutputStream

java.lang.Object
  extended byorg.tritonus.share.sampled.file.TAudioOutputStream
      extended byorg.tritonus.sampled.file.AuAudioOutputStream
All Implemented Interfaces:
AudioOutputStream

public class AuAudioOutputStream
extends TAudioOutputStream

AudioOutputStream for AU files.

Author:
Florian Bomers, Matthias Pfisterer

Constructor Summary
AuAudioOutputStream(AudioFormat audioFormat, long lLength, TDataOutputStream dataOutputStream)
           
 
Method Summary
protected static int getTextLength(String s)
          Returns number of bytes that have to written for string s (with alignment)
protected  void patchHeader()
           
protected  void writeHeader()
          Writes the header of the audio file.
protected static void writeText(TDataOutputStream dos, String s)
          Writes a null-terminated ascii string s to f.
 
Methods inherited from class org.tritonus.share.sampled.file.TAudioOutputStream
close, getCalculatedLength, getDataOutputStream, getFormat, getLength, setLengthFromCalculatedLength, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuAudioOutputStream

public AuAudioOutputStream(AudioFormat audioFormat,
                           long lLength,
                           TDataOutputStream dataOutputStream)
Method Detail

writeText

protected static void writeText(TDataOutputStream dos,
                                String s)
                         throws IOException
Writes a null-terminated ascii string s to f. The total number of bytes written is aligned on a 2byte boundary.

Throws:
IOException - Write error.

getTextLength

protected static int getTextLength(String s)
Returns number of bytes that have to written for string s (with alignment)


writeHeader

protected void writeHeader()
                    throws IOException
Description copied from class: TAudioOutputStream
Writes the header of the audio file.

Specified by:
writeHeader in class TAudioOutputStream
Throws:
IOException

patchHeader

protected void patchHeader()
                    throws IOException
Overrides:
patchHeader in class TAudioOutputStream
Throws:
IOException