|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.geosolutions.tools.io.file.Copy
public abstract class Copy
Constructor Summary | |
---|---|
Copy()
|
Method Summary | |
---|---|
static List<FutureTask<File>> |
asynchCopyListFileToNFS(ExecutorService ex,
List<File> list,
File baseDestDir,
int seconds)
Copy a list of files asynchronously to a destination (which can be on nfs) each thread wait (at least) 'seconds' seconds for each file propagation. |
static FutureTask<File> |
asynchFileCopyToNFS(ExecutorService ex,
File source,
File destination,
int seconds)
|
static void |
copyFile(File sourceFile,
File destinationFile)
Copy the input file onto the output file using a default buffer size. |
static void |
copyFile(File sourceFile,
File destinationFile,
int size)
Copy the input file onto the output file using the specified buffer size. |
static File |
copyFileToNFS(File source,
File dest,
boolean overwrite,
int seconds)
Copy a file (preserving data) to a destination (which can be on nfs) waiting (at least) 'seconds' seconds for its propagation. |
static File |
copyFileToNFS(File source,
File dest,
int seconds)
Copy a file (preserving data) to a destination (which can be on nfs) waiting (at least) 'seconds' seconds for its propagation. |
static List<File> |
copyListFileToNFS(List<File> list,
File baseDestDir,
boolean serialOverwrite,
int seconds)
|
static List<File> |
parallelCopyListFileToNFS(ExecutorService es,
List<File> list,
File baseDestDir,
int seconds)
Copy a list of files (preserving data) to a destination (which can be on nfs) waiting (at least) 'seconds' seconds for each file propagation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Copy()
Method Detail |
---|
public static void copyFile(File sourceFile, File destinationFile) throws IOException
sourceFile
- the File
to copy from.destinationFile
- the File
to copy to.
IOException
- in case something bad happens.public static void copyFile(File sourceFile, File destinationFile, int size) throws IOException
sourceFile
- the File
to copy from.destinationFile
- the File
to copy to.size
- buffer size.
IOException
- in case something bad happens.public static File copyFileToNFS(File source, File dest, boolean overwrite, int seconds)
source
- dest
- overwrite
- if false and destination exists() do not overwrite the fileseconds
- to wait (maximum) for nfs propagate. If -1 no check is
performed.
public static File copyFileToNFS(File source, File dest, int seconds)
source
- dest
- seconds
- to wait (maximum) for nfs propagate. If -1 no check is
performed.
public static List<File> copyListFileToNFS(List<File> list, File baseDestDir, boolean serialOverwrite, int seconds)
list
- baseDestDir
- serialOverwrite
- if set true, overwrite is permitted (but parallel file transfer is
disabled)seconds
-
public static List<File> parallelCopyListFileToNFS(ExecutorService es, List<File> list, File baseDestDir, int seconds)
es
- The ExecutorService or null if you want to use a
CachedThreadPool.list
- baseDestDir
- overwrite
- if false and destination exists() do not overwrite the fileseconds
-
public static FutureTask<File> asynchFileCopyToNFS(ExecutorService ex, File source, File destination, int seconds) throws RejectedExecutionException, IllegalArgumentException
ex
- source
- destination
- seconds
-
RejectedExecutionException
- - if this task cannot be accepted for execution.
IllegalArgumentException
- - if executor is null or terminated.public static List<FutureTask<File>> asynchCopyListFileToNFS(ExecutorService ex, List<File> list, File baseDestDir, int seconds)
ex
- the thread pool executorbaseDestDir
- overwrite
- if false and destination exists() do not overwrite the fileseconds
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |