|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
com.groovemanager.thread.ProgressThread
com.groovemanager.sampled.waveform.SavePeakWaveFormThread
This ProgressThread implementation can be used to save the data from a WaveForm into a peak file
| Nested Class Summary |
|---|
| Nested classes inherited from class java.lang.Thread |
|---|
java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected int |
iSize
The interval size |
protected long |
lastModified
The last modification date of the audio file or -1, if it is not known |
protected java.io.OutputStream |
out
The OutputStream to write to |
protected WaveForm |
source
The WaveForm to get the peak data from |
protected int |
written
The number of snapshots written so far |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
SavePeakWaveFormThread(ProgressListener mon,
WaveForm source,
int iSize,
java.io.OutputStream out,
long lastModified)
Create a new SavePeakWaveFormThread using the given interval size that will be monitored by the given ProgressListener |
|
SavePeakWaveFormThread(WaveForm source,
int iSize,
java.io.OutputStream out,
long lastModified)
Create a new SavePeakWaveFormThread using the given interval size |
|
SavePeakWaveFormThread(WaveForm source,
java.io.OutputStream out,
long lastModified)
Create a new SavePeakWaveFormThread using the interval size of the given WaveForm. |
|
| Method Summary | |
|---|---|
protected boolean |
breakCondition()
The break condition to indicate that the operation has finished |
protected void |
cleanUp()
Free any ressources and perform clean up operations. |
protected void |
init()
Any kind of initialization in the moment right before starting the operation should be performed here |
protected void |
processNext()
Perform the next step. |
protected java.lang.Object |
result()
Specify the result of this operation, if any. |
protected int |
tellElapsed()
Tell the length of the operation elapsed so for |
protected int |
tellTotal()
Tell the total length of the operation |
| Methods inherited from class com.groovemanager.thread.ProgressThread |
|---|
cancelOperation, getElapsed, getErrorMessage, getResult, getTotal, hasFinished, run, setMonitor |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int iSize
protected long lastModified
protected java.io.OutputStream out
protected WaveForm source
protected int written
| Constructor Detail |
|---|
public SavePeakWaveFormThread(ProgressListener mon,
WaveForm source,
int iSize,
java.io.OutputStream out,
long lastModified)
mon - The ProgressListener to monitor the progresssource - The WaveForm to get the peak data fromiSize - The interval size to useout - The OutputStream to write tolastModified - last modification date of the audio file or -1, if
it is not known
public SavePeakWaveFormThread(WaveForm source,
int iSize,
java.io.OutputStream out,
long lastModified)
source - The WaveForm to get the peak data fromiSize - The interval size to useout - The OutputStream to write tolastModified - last modification date of the audio file or -1, if
it is not known
public SavePeakWaveFormThread(WaveForm source,
java.io.OutputStream out,
long lastModified)
source - The WaveForm to get the peak data fromout - The OutputStream to write tolastModified - last modification date of the audio file or -1, if
it is not known| Method Detail |
|---|
protected boolean breakCondition()
ProgressThread
breakCondition in class ProgressThreadprotected void cleanUp()
ProgressThread
cleanUp in class ProgressThreadprotected void init()
ProgressThread
init in class ProgressThread
protected void processNext()
throws java.io.IOException
ProgressThreadtellElpased() < tellTotal() andbreakCondition() != true and
processNext in class ProgressThreadjava.io.IOExceptionprotected java.lang.Object result()
ProgressThread
result in class ProgressThreadnull should onlx be returned, if the operation
didnīt finish correctly. If it did finish correctly, but it has no
result, a dummy object should be returned.protected int tellElapsed()
ProgressThread
tellElapsed in class ProgressThreadprotected int tellTotal()
ProgressThread
tellTotal in class ProgressThread
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||