A representation of an uploaded file received in a multipart request.
The file contents are either stored in memory or temporarily on disk.
In either case, the user is responsible for copying file contents to a
session-level or persistent store as and if desired. The temporary storage
will be cleared at the end of request processing.
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 target file has been moved in the filesystem, this operation
cannot be invoked again afterwards. Therefore, call this method just once
in order to work with any storage mechanism.
NOTE: Depending on the underlying provider, temporary storage
may be container-dependent, including the base directory for relative
destinations specified here (e.g. with Servlet 3.0 multipart handling).
For absolute destinations, the target file may get renamed/moved from its
temporary location or newly copied, even if a temporary copy already exists.
dest - the destination file (typically absolute)
java.io.IOException - in case of reading or writing errors
java.lang.IllegalStateException - if the file has already been moved
in the filesystem and is not available anymore for another transfer