code: public BoxFile.Info upload(BoxAPIConnection boxApi, String folderId, InputStream stream, URL url,
                                 String fileName, long fileSize) throws InterruptedException, IOException {
          //Create a upload session
          BoxFileUploadSession.Info session = this.createUploadSession(boxApi, folderId, url, fileName, fileSize);
          return this.uploadHelper(session, stream, fileSize);
      }
docs: Uploads a new large file.
  @param boxApi the API connection to be used by the upload session.
  @param folderId the id of the folder in which the file will be uploaded.
  @param stream the input stream that feeds the content of the file.
  @param url the upload session URL.
  @param fileName the name of the file to be created.
  @param fileSize the total size of the file.
  @return the created file instance.
  @throws InterruptedException when a thread gets interupted.
  @throws IOException when reading a stream throws exception.