@Singleton @Named public class DefaultFileProcessor extends Object implements FileProcessor
FileProcessor.ProgressListener| Constructor and Description |
|---|
DefaultFileProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
copy(File source,
File target) |
long |
copy(File source,
File target,
FileProcessor.ProgressListener listener) |
boolean |
mkdirs(File directory)
Thread-safe variant of
File.mkdirs(). |
void |
move(File source,
File target) |
String |
readChecksum(File checksumFile) |
void |
write(File target,
InputStream source) |
void |
write(File target,
String data) |
void |
writeChecksum(File checksumFile,
String checksum) |
public DefaultFileProcessor()
public boolean mkdirs(File directory)
File.mkdirs(). Creates the directory named by the given abstract pathname,
including any necessary but nonexistent parent directories. Note that if this operation fails it may have
succeeded in creating some of the necessary parent directories.mkdirs in interface FileProcessordirectory - The directory to create, may be null.true if and only if the directory was created, along with all necessary parent directories;
false otherwisepublic void write(File target, String data) throws IOException
write in interface FileProcessorIOExceptionpublic void write(File target, InputStream source) throws IOException
write in interface FileProcessorIOExceptionpublic void copy(File source, File target) throws IOException
copy in interface FileProcessorIOExceptionpublic long copy(File source, File target, FileProcessor.ProgressListener listener) throws IOException
copy in interface FileProcessorIOExceptionpublic void move(File source, File target) throws IOException
move in interface FileProcessorIOExceptionpublic String readChecksum(File checksumFile) throws IOException
readChecksum in interface FileProcessorIOExceptionpublic void writeChecksum(File checksumFile, String checksum) throws IOException
writeChecksum in interface FileProcessorIOExceptionCopyright © 2010–2022 The Apache Software Foundation. All rights reserved.