|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FileProcessor
A utility component to perform file-based operations.
Nested Class Summary | |
---|---|
static interface |
FileProcessor.ProgressListener
A listener object that is notified for every progress made while copying files. |
Method Summary | |
---|---|
long |
copy(File source,
File target,
FileProcessor.ProgressListener listener)
Copies the specified source file to the given target file. |
boolean |
mkdirs(File directory)
Creates the directory named by the given abstract pathname, including any necessary but nonexistent parent directories. |
void |
move(File source,
File target)
Moves the specified source file to the given target file. |
void |
write(File file,
String data)
Writes the given data to a file. |
Method Detail |
---|
boolean mkdirs(File directory)
directory
- The directory to create, may be null
.
true
if and only if the directory was created, along with all necessary parent directories;
false
otherwisevoid write(File file, String data) throws IOException
file
- The file to write to, must not be null
. This file will be overwritten.data
- The data to write, may be null
.
IOException
- If an I/O error occurs.long copy(File source, File target, FileProcessor.ProgressListener listener) throws IOException
source
- The file to copy from, must not be null
.target
- The file to copy to, must not be null
.listener
- The listener to notify about the copy progress, may be null
.
IOException
- If an I/O error occurs.void move(File source, File target) throws IOException
source
- The file to move from, must not be null
.target
- The file to move to, must not be null
.
IOException
- If an I/O error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |