code: public void write(File file) throws Exception {
          try (FileOutputStream fout = new FileOutputStream(file)) {
              fout.write(get());
          }
      }
docs: A convenience method to write an uploaded item to disk. The client code
  is not concerned with whether or not the item is stored in memory, or on
  disk in a temporary location. They just want to write the uploaded item
  to a file.
  <p>
  This implementation first attempts to rename the uploaded item to the
  specified destination file, if the item was originally written to disk.
  Otherwise, the data will be copied to the specified file.
  <p>
  This method is only guaranteed to work <em>once</em>, the first time it
  is invoked for a particular item. This is because, in the event that the
  method renames a temporary file, that file will no longer be available
  to copy or rename again at a later time.
  
  @param file the {@code File} into which the uploaded item should
  be stored
  @throws Exception if an error occurs