org.tritonus.sampled.file
Class AiffAudioFileWriter

java.lang.Object
  extended byjavax.sound.sampled.spi.AudioFileWriter
      extended byorg.tritonus.share.sampled.file.TAudioFileWriter
          extended byorg.tritonus.sampled.file.AiffAudioFileWriter

public class AiffAudioFileWriter
extends TAudioFileWriter

Class for writing AIFF and AIFF-C files.

Author:
Florian Bomers

Field Summary
 
Fields inherited from class org.tritonus.share.sampled.file.TAudioFileWriter
NULL_TYPE_ARRAY, PCM_UNSIGNED
 
Constructor Summary
AiffAudioFileWriter()
           
 
Method Summary
protected  AudioOutputStream getAudioOutputStream(AudioFormat audioFormat, long lLengthInBytes, AudioFileFormat.Type fileType, TDataOutputStream dataOutputStream)
           
protected  boolean isAudioFormatSupportedImpl(AudioFormat format, AudioFileFormat.Type fileType)
          Checks whether the passed AudioFormat can be handled.
 
Methods inherited from class org.tritonus.share.sampled.file.TAudioFileWriter
getAudioFileTypes, getAudioFileTypes, getSupportedAudioFormats, isFileTypeSupported, isFileTypeSupported, write, write, writeImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AiffAudioFileWriter

public AiffAudioFileWriter()
Method Detail

isAudioFormatSupportedImpl

protected boolean isAudioFormatSupportedImpl(AudioFormat format,
                                             AudioFileFormat.Type fileType)
Description copied from class: TAudioFileWriter
Checks whether the passed AudioFormat can be handled. In this simple implementation, it is only checked if the passed AudioFormat matches one of the generally handled formats (i.e. the fileType argument is ignored). If the handled AudioFormats depend on the file type, this method or getSupportedAudioFormats() (on which this method relies) has to be overwritten by subclasses.

This is the central method for checking if a FORMAT is supported. Inheriting classes can overwrite this for performance or to exclude/include special type/format combinations.

This method is only called when the fileType is in the list of supported file types ! Overriding classes need not check this.

Overrides:
isAudioFormatSupportedImpl in class TAudioFileWriter

getAudioOutputStream

protected AudioOutputStream getAudioOutputStream(AudioFormat audioFormat,
                                                 long lLengthInBytes,
                                                 AudioFileFormat.Type fileType,
                                                 TDataOutputStream dataOutputStream)
                                          throws IOException
Specified by:
getAudioOutputStream in class TAudioFileWriter
Throws:
IOException