Package ipsk.audio.io.push
Class GrowingTempFileAudioSource
- java.lang.Object
-
- ipsk.audio.io.push.GrowingTempFileAudioSource
-
- All Implemented Interfaces:
AudioSource
,GrowingAudioSource
,IAudioOutputStream
,IOutputStream
,java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
public class GrowingTempFileAudioSource extends java.lang.Object implements GrowingAudioSource, IAudioOutputStream
- Author:
- klausj
-
-
Field Summary
-
Fields inherited from interface ipsk.audio.AudioSource
DATA_FLAVOR
-
-
Constructor Summary
Constructors Constructor Description GrowingTempFileAudioSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addGrowListener(GrowListener l)
void
close()
void
flush()
javax.sound.sampled.AudioFormat
getAudioFormat()
javax.sound.sampled.AudioInputStream
getAudioInputStream()
Returns a new audio input stream.javax.sound.sampled.AudioFormat
getFormat()
long
getFrameLength()
boolean
isFinished()
void
release()
void
removeGrowListener(GrowListener l)
void
setAudioFormat(javax.sound.sampled.AudioFormat audioFormat)
void
write(byte[] buf, int offset, int len)
-
-
-
Method Detail
-
getAudioInputStream
public javax.sound.sampled.AudioInputStream getAudioInputStream() throws AudioSourceException
Description copied from interface:AudioSource
Returns a new audio input stream.- Specified by:
getAudioInputStream
in interfaceAudioSource
- Returns:
- a new audio input stream
- Throws:
AudioSourceException
-
getFrameLength
public long getFrameLength() throws AudioSourceException
- Specified by:
getFrameLength
in interfaceAudioSource
- Throws:
AudioSourceException
-
getFormat
public javax.sound.sampled.AudioFormat getFormat() throws AudioSourceException
- Specified by:
getFormat
in interfaceAudioSource
- Throws:
AudioSourceException
-
addGrowListener
public void addGrowListener(GrowListener l)
- Specified by:
addGrowListener
in interfaceGrowingAudioSource
-
removeGrowListener
public void removeGrowListener(GrowListener l)
- Specified by:
removeGrowListener
in interfaceGrowingAudioSource
-
write
public void write(byte[] buf, int offset, int len) throws java.io.IOException
- Specified by:
write
in interfaceIOutputStream
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
- Specified by:
flush
in interfacejava.io.Flushable
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
getAudioFormat
public javax.sound.sampled.AudioFormat getAudioFormat()
- Specified by:
getAudioFormat
in interfaceIAudioOutputStream
-
setAudioFormat
public void setAudioFormat(javax.sound.sampled.AudioFormat audioFormat) throws AudioFormatNotSupportedException
- Specified by:
setAudioFormat
in interfaceIAudioOutputStream
- Throws:
AudioFormatNotSupportedException
-
isFinished
public boolean isFinished()
-
release
public void release()
-
-