public class OverwriteIfExistsWorker extends NioWorker
FsWorker
that uses overwrites the file if it already exists.In the adapter configuration file this class is aliased as fs-overwrite-file which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
OverwriteIfExistsWorker() |
Modifier and Type | Method and Description |
---|---|
void |
put(byte[] data,
java.io.File file)
Writes
data to the specified file . |
wrapException
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkExists, checkNonExistent, checkReadable, checkWriteable, delete, isDirectory, isFile, isWriteableDir, listFiles, listFiles, rename
public void put(byte[] data, java.io.File file) throws FsException
FsWorker
Writes data
to the specified file
. If the named file already exists or if part of the path doesn't
exist a FsException
is thrown.
put
in interface FsWorker
put
in class NioWorker
data
- the data to writefile
- the file to write toFsException
- wrapping any underlying Exception that may occur