|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.sound.sampled.spi.AudioFileWriter
org.tritonus.share.sampled.file.TAudioFileWriter
Common base class for implementing classes of AudioFileWriter.
It provides often-used functionality and the new architecture using an AudioOutputStream.
There should be only one set of audio formats supported by any given class of TAudioFileWriter. This class assumes implicitely that all supported file types have a common set of audio formats they can handle.
Field Summary | |
---|---|
protected static int |
ALL
|
protected static AudioFileFormat.Type[] |
NULL_TYPE_ARRAY
|
static AudioFormat.Encoding |
PCM_SIGNED
|
static AudioFormat.Encoding |
PCM_UNSIGNED
|
Constructor Summary | |
---|---|
protected |
TAudioFileWriter(Collection fileTypes,
Collection audioFormats)
Inheriting classes should call this constructor in order to make use of the functionality of TAudioFileWriter. |
Method Summary | |
---|---|
AudioFileFormat.Type[] |
getAudioFileTypes()
|
AudioFileFormat.Type[] |
getAudioFileTypes(AudioInputStream audioInputStream)
|
protected abstract AudioOutputStream |
getAudioOutputStream(AudioFormat audioFormat,
long lLengthInBytes,
AudioFileFormat.Type fileType,
TDataOutputStream dataOutputStream)
|
protected Iterator |
getSupportedAudioFormats(AudioFileFormat.Type fileType)
Returns the AudioFormat that can be handled for the given file type. |
protected boolean |
isAudioFormatSupportedImpl(AudioFormat audioFormat,
AudioFileFormat.Type fileType)
Checks whether the passed AudioFormat can be handled. |
boolean |
isFileTypeSupported(AudioFileFormat.Type fileType)
|
boolean |
isFileTypeSupported(AudioFileFormat.Type fileType,
AudioInputStream audioInputStream)
|
int |
write(AudioInputStream audioInputStream,
AudioFileFormat.Type fileType,
File file)
|
int |
write(AudioInputStream audioInputStream,
AudioFileFormat.Type fileType,
OutputStream outputStream)
|
protected int |
writeImpl(AudioInputStream audioInputStream,
AudioOutputStream audioOutputStream,
boolean bNeedsConversion)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int ALL
public static AudioFormat.Encoding PCM_SIGNED
public static AudioFormat.Encoding PCM_UNSIGNED
protected static final AudioFileFormat.Type[] NULL_TYPE_ARRAY
Constructor Detail |
---|
protected TAudioFileWriter(Collection fileTypes, Collection audioFormats)
Method Detail |
---|
public AudioFileFormat.Type[] getAudioFileTypes()
getAudioFileTypes
in class AudioFileWriter
public boolean isFileTypeSupported(AudioFileFormat.Type fileType)
isFileTypeSupported
in class AudioFileWriter
public AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream audioInputStream)
getAudioFileTypes
in class AudioFileWriter
public boolean isFileTypeSupported(AudioFileFormat.Type fileType, AudioInputStream audioInputStream)
isFileTypeSupported
in class AudioFileWriter
public int write(AudioInputStream audioInputStream, AudioFileFormat.Type fileType, File file) throws IOException
write
in class AudioFileWriter
IOException
public int write(AudioInputStream audioInputStream, AudioFileFormat.Type fileType, OutputStream outputStream) throws IOException
write
in class AudioFileWriter
IOException
protected int writeImpl(AudioInputStream audioInputStream, AudioOutputStream audioOutputStream, boolean bNeedsConversion) throws IOException
IOException
protected Iterator getSupportedAudioFormats(AudioFileFormat.Type fileType)
protected boolean isAudioFormatSupportedImpl(AudioFormat audioFormat, AudioFileFormat.Type fileType)
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.
protected abstract AudioOutputStream getAudioOutputStream(AudioFormat audioFormat, long lLengthInBytes, AudioFileFormat.Type fileType, TDataOutputStream dataOutputStream) throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |