code: public static long copy(InputStream inputStream, File file) throws FileNotFoundException, IOException
    {
      return copy(inputStream, new FileOutputStream(file));
    }
docs: Copy bytes from requested input stream to given target file. This method creates the target file if does not
  already exist.
  
  @param inputStream source input stream,
  @param file target file.
  @return the number of bytes processed.
  @throws FileNotFoundException if given <code>file</code> does not exist and cannot be created.
  @throws IOException if bytes transfer fails.