net.sf.jomic.tools
Class CopyFileTask

java.lang.Object
  extended by net.sf.jomic.tools.AbstractTask
      extended by net.sf.jomic.tools.CopyFileTask
All Implemented Interfaces:
Task

public class CopyFileTask
extends AbstractTask

Task to copy a file, overwritting a possibly already existing file. If the task fails, an attempt is made to remove the possibly incomplete file.

Author:
Thomas Aglassinger

Constructor Summary
CopyFileTask(java.io.File newSourceFile, java.io.File newTargetFile)
           
CopyFileTask(java.io.File newSourceFile, java.io.File newTargetFile, boolean newMakeDirs)
           
 
Method Summary
 void start()
          Start the task, which will cause the progress to iterate from 0 to getMaximum.
 
Methods inherited from class net.sf.jomic.tools.AbstractTask
addProgressChangeListener, getMaxProgress, getProgress, getProgressMessage, isInterrupted, removeProgressChangeListener, setMaxProgress, setProgress, setProgressMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyFileTask

public CopyFileTask(java.io.File newSourceFile,
                    java.io.File newTargetFile,
                    boolean newMakeDirs)

CopyFileTask

public CopyFileTask(java.io.File newSourceFile,
                    java.io.File newTargetFile)
Method Detail

start

public void start()
           throws java.io.IOException
Description copied from interface: Task
Start the task, which will cause the progress to iterate from 0 to getMaximum.

Specified by:
start in interface Task
Specified by:
start in class AbstractTask
Throws:
java.io.IOException