code: public BoxFile.Info uploadNewVersion(InputStream fileContent, String fileContentSHA1, Date modified, long fileSize,
                                ProgressListener listener) {
          URL uploadURL = CONTENT_URL_TEMPLATE.build(this.getAPI().getBaseUploadURL(), this.getID());
          BoxMultipartRequest request = new BoxMultipartRequest(getAPI(), uploadURL);
  
          if (fileSize > 0) {
              request.setFile(fileContent, "", fileSize);
          } else {
              request.setFile(fileContent, "");
          }
  
          if (fileContentSHA1 != null) {
              request.setContentSHA1(fileContentSHA1);
          }
  
          if (modified != null) {
              request.putField("content_modified_at", modified);
          }
  
          BoxJSONResponse response;
          if (listener == null) {
              response = (BoxJSONResponse) request.send();
          } else {
              response = (BoxJSONResponse) request.send(listener);
          }
  
          String fileJSON = response.getJsonObject().get("entries").asArray().get(0).toString();
  
          return new BoxFile.Info(fileJSON);
      }
docs: Uploads a new version of this file, replacing the current version, while reporting the progress to a
  ProgressListener. Note that only users with premium accounts will be able to view and recover previous versions
  of the file.
  
  @param fileContent     a stream containing the new file contents.
  @param fileContentSHA1 the SHA1 hash of the file contents. will be sent along in the Content-MD5 header
  @param modified        the date that the new version was modified.
  @param fileSize        the size of the file used for determining the progress of the upload.
  @param listener        a listener for monitoring the upload's progress.
  @return the uploaded file version.