code: public <E extends Throwable> DbxEntry.File uploadFile(String targetPath, DbxWriteMode writeMode, long numBytes, DbxStreamWriter<E> writer)
          throws DbxException, E
      {
          Uploader uploader = startUploadFile(targetPath, writeMode, numBytes);
          return finishUploadFile(uploader, writer);
      }
docs: Upload file contents to Dropbox, getting contents from the given {@link DbxStreamWriter}.
  
  <pre>
  DbxClientV1 dbxClient = ...
  <b>// Create a file on Dropbox with 100 3-digit random numbers, one per line.</b>
  final int numRandoms = 100;
  int fileSize = numRandoms * 4;  <b>3 digits, plus a newline</b>
  dbxClient.uploadFile("/Randoms.txt", {@link DbxWriteMode#add()}, fileSize,
  new DbxStreamWriter&lt;RuntimeException&gt;() {
  public void write(OutputStream out) throws IOException
  {
  Random rand = new Random();
  PrintWriter pw = new PrintWriter(out);
  for (int i = 0; i &lt; numRandoms; i++) {
  pw.printf("%03d\n", rand.nextInt(1000));
  }
  pw.flush();
  }
  });
  </pre>
  
  @param targetPath
  The path to the file on Dropbox (see {@link DbxPathV1}).  If a file at
  that path already exists on Dropbox, then the {@code writeMode} parameter
  will determine what happens.
  
  @param writeMode
  Determines what to do if there's already a file at the given {@code targetPath}.
  
  @param numBytes
  The number of bytes you're going to upload via the returned {@link DbxClientV1.Uploader}.
  Use {@code -1} if you don't know ahead of time.
  
  @param writer
  A callback that will be called when it's time to actually write out the
  body of the file.
  
  @throws E
  If {@code writer.write()} throws an exception, it will propagate out of this function.