Package ipsk.audio.io

Class ProgressMonitorAudioInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class ProgressMonitorAudioInputStream
    extends javax.sound.sampled.AudioInputStream
    Audio stream which generates progress events. By using the AudioSystem.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
    • Constructor Detail

      • ProgressMonitorAudioInputStream

        public ProgressMonitorAudioInputStream​(javax.sound.sampled.AudioInputStream srcAudioInputStream)
    • Method Detail

      • available

        public int available()
                      throws java.io.IOException
        Overrides:
        available in class javax.sound.sampled.AudioInputStream
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class javax.sound.sampled.AudioInputStream
        Throws:
        java.io.IOException
      • getFormat

        public javax.sound.sampled.AudioFormat getFormat()
        Overrides:
        getFormat in class javax.sound.sampled.AudioInputStream
      • getFrameLength

        public long getFrameLength()
        Overrides:
        getFrameLength in class javax.sound.sampled.AudioInputStream
      • mark

        public void mark​(int arg0)
        Overrides:
        mark in class javax.sound.sampled.AudioInputStream
      • markSupported

        public boolean markSupported()
        Overrides:
        markSupported in class javax.sound.sampled.AudioInputStream
      • read

        public int read()
                 throws java.io.IOException
        Overrides:
        read in class javax.sound.sampled.AudioInputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] buf)
                 throws java.io.IOException
        Overrides:
        read in class javax.sound.sampled.AudioInputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] buf,
                        int offset,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class javax.sound.sampled.AudioInputStream
        Throws:
        java.io.IOException
      • reset

        public void reset()
                   throws java.io.IOException
        Overrides:
        reset in class javax.sound.sampled.AudioInputStream
        Throws:
        java.io.IOException
      • skip

        public long skip​(long n)
                  throws java.io.IOException
        Overrides:
        skip in class javax.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:
        toString in class java.lang.Object
      • isCancelled

        public boolean isCancelled()
      • setCancelled

        public void setCancelled​(boolean cancelled)