Package ipsk.audio.io
Class ProgressMonitorAudioInputStream
- java.lang.Object
-
- java.io.InputStream
-
- javax.sound.sampled.AudioInputStream
-
- ipsk.audio.io.ProgressMonitorAudioInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class ProgressMonitorAudioInputStream extends javax.sound.sampled.AudioInputStreamAudio stream which generates progress events. By using theAudioSystem.write(AudioInputStream, javax.sound.sampled.AudioFileFormat.Type, java.io.File)method we are not able to monitor write progress of large audio files. This stream wraps the original audio stream.- Author:
- K.Jaensch, klausj@phonetik.uni-muenchen.de
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classProgressMonitorAudioInputStream.EventTransformer
-
Constructor Summary
Constructors Constructor Description ProgressMonitorAudioInputStream(javax.sound.sampled.AudioInputStream srcAudioInputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProgressListener(ProgressListener progressListener)intavailable()voidclose()javax.sound.sampled.AudioFormatgetFormat()longgetFrameLength()booleanisCancelled()voidmark(int arg0)booleanmarkSupported()intread()intread(byte[] buf)intread(byte[] buf, int offset, int len)voidremoveProgressListener(ProgressListener progressListener)voidreset()voidsetCancelled(boolean cancelled)longskip(long n)java.lang.StringtoString()
-
-
-
Method Detail
-
available
public int available() throws java.io.IOException- Overrides:
availablein classjavax.sound.sampled.AudioInputStream- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjavax.sound.sampled.AudioInputStream- Throws:
java.io.IOException
-
getFormat
public javax.sound.sampled.AudioFormat getFormat()
- Overrides:
getFormatin classjavax.sound.sampled.AudioInputStream
-
getFrameLength
public long getFrameLength()
- Overrides:
getFrameLengthin classjavax.sound.sampled.AudioInputStream
-
mark
public void mark(int arg0)
- Overrides:
markin classjavax.sound.sampled.AudioInputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classjavax.sound.sampled.AudioInputStream
-
read
public int read() throws java.io.IOException- Overrides:
readin classjavax.sound.sampled.AudioInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] buf) throws java.io.IOException- Overrides:
readin classjavax.sound.sampled.AudioInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] buf, int offset, int len) throws java.io.IOException- Overrides:
readin classjavax.sound.sampled.AudioInputStream- Throws:
java.io.IOException
-
reset
public void reset() throws java.io.IOException- Overrides:
resetin classjavax.sound.sampled.AudioInputStream- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException- Overrides:
skipin classjavax.sound.sampled.AudioInputStream- Throws:
java.io.IOException
-
addProgressListener
public void addProgressListener(ProgressListener progressListener)
-
removeProgressListener
public void removeProgressListener(ProgressListener progressListener)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isCancelled
public boolean isCancelled()
-
setCancelled
public void setCancelled(boolean cancelled)
-
-