Transfer the received file to the given destination file.
This may either move the file in the filesystem, copy the file in the filesystem, or save memory-held contents to the destination file. If the destination file already exists, it will be deleted first.
If the file has been moved in the filesystem, this operation cannot be invoked again. Therefore, call this method just once to be able to work with any storage mechanism.
@param dest the destination file
@throws IOException in case of reading or writing errors
@throws IllegalStateException if the file has already been movedin the filesystem and is not available anymore for another transfer