code: public BoxRequestsFile.UploadNewVersion getUploadNewVersionRequest(File file, String destinationFileId) {
          try {
              BoxRequestsFile.UploadNewVersion request = getUploadNewVersionRequest(new FileInputStream(file), destinationFileId);
              request.setUploadSize(file.length());
              request.setModifiedDate(new Date(file.lastModified()));
              return request;
          } catch (FileNotFoundException e) {
              throw new IllegalArgumentException(e);
          }
      }
docs: Gets a request that uploads a new file version from an existing file
  
  @param file  file to upload as a new version
  @param destinationFileId id of the file to upload a new version of
  @return  request to upload a new file version from an existing file