Class FileWriterThread

  • All Implemented Interfaces:
    java.lang.Runnable

    public class FileWriterThread
    extends java.lang.Thread
    Audio file writer in an own thread.
    Author:
    K.Jaensch, klausj@phonetik.uni-muenchen.de
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int DONE  
      static int ERROR  
      static int IDLE  
      static int WRITING  
      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Constructor Summary

      Constructors 
      Constructor Description
      FileWriterThread​(FileWriterListener listener, javax.sound.sampled.AudioInputStream ais, javax.sound.sampled.AudioFileFormat.Type aff, java.io.File outFile)
      Create new file writer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void create()  
      java.lang.Exception getException()  
      void run()  
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
    • Constructor Detail

      • FileWriterThread

        public FileWriterThread​(FileWriterListener listener,
                                javax.sound.sampled.AudioInputStream ais,
                                javax.sound.sampled.AudioFileFormat.Type aff,
                                java.io.File outFile)
        Create new file writer.
        Parameters:
        listener - notified on events
        ais - the audio stream to read from
        aff - the audio file format
        outFile - the audio file to write to
    • Method Detail

      • create

        public void create()
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread
      • getException

        public java.lang.Exception getException()