Specifically, I'm saving a file upload to local file in a Lift web app.
With Java 7 or later you can use Files
from the new File I/O:
Files.copy(from, to)
where from
and to
can be Path
s or InputStream
s. This way, you can even use it to conveniently extract resources from applications packed in a jar.