caelum/vraptor4 — pull request #883 by garcia-jj (2014-11-12 22:32:14+00:00)
Title: Adding method writeTo to UploadedFile interface

This change allow users to simple copy uploaded files to their application, if needs. Applications that don't save files in the filesystem can use `getFile` method, that now throws an `IOException` to compliance with spec when we work with filesystem.

A new class was added, `CommonsUploadUploadedFile`. This class only delegates all operations to commons-fileupload API, allowing us to use methods like `write` that test if files can be moved, and if not, copy the file. This feature have a very good performance because moving files consumes less resources than copy to a new file, specially when copy too large files. I know this name is too uggly, but I can't think in another name. Ideas?

The `DefaultUploadedFile` class still exists to keep legacy code for users who overrides this class. I don't deprecated this class because can be reused in the future.

Targeted to 4.2 because changes public API, and adds new features.