Class LargeFileUploadTask<UploadType>

java.lang.Object
com.microsoft.graph.tasks.LargeFileUploadTask<UploadType>
Type Parameters:
UploadType - the upload item type

public class LargeFileUploadTask<UploadType> extends Object
ChunkedUpload service provider
  • Constructor Details

    • LargeFileUploadTask

      public LargeFileUploadTask(@Nonnull IUploadSession uploadSession, @Nonnull IBaseClient<?> client, @Nonnull InputStream inputStream, long streamSize, @Nonnull Class<UploadType> uploadTypeClass)
      Creates the ChunkedUploadProvider
      Parameters:
      uploadSession - the initial upload session
      client - the Graph client
      inputStream - the input stream
      streamSize - the stream size
      uploadTypeClass - the upload type class
  • Method Details

    • uploadAsync

      @Nonnull public CompletableFuture<LargeFileUploadResult<UploadType>> uploadAsync(@Nullable int chunkSize, @Nullable List<Option> options, @Nullable IProgressCallback progressCallback) throws IOException
      Uploads content to remote upload session based on the input stream
      Parameters:
      chunkSize - the customized chunk size
      options - the upload options
      progressCallback - the callback for upload progress
      Returns:
      a future with the result
      Throws:
      IOException - the IO exception that occurred during upload
    • uploadAsync

      @Nonnull public CompletableFuture<LargeFileUploadResult<UploadType>> uploadAsync() throws IOException
      Uploads content to remote upload session based on the input stream
      Returns:
      a future with the result
      Throws:
      IOException - the IO exception that occurred during upload
    • uploadAsync

      @Nonnull public CompletableFuture<LargeFileUploadResult<UploadType>> uploadAsync(@Nullable int chunkSize) throws IOException
      Uploads content to remote upload session based on the input stream
      Parameters:
      chunkSize - the customized chunk size
      Returns:
      a future with the result
      Throws:
      IOException - the IO exception that occurred during upload
    • uploadAsync

      @Nonnull public CompletableFuture<LargeFileUploadResult<UploadType>> uploadAsync(@Nullable int chunkSize, @Nullable List<Option> options) throws IOException
      Uploads content to remote upload session based on the input stream
      Parameters:
      chunkSize - the customized chunk size
      options - the upload options
      Returns:
      a future with the result
      Throws:
      IOException - the IO exception that occurred during upload
    • upload

      @Nonnull public LargeFileUploadResult<UploadType> upload(@Nullable int chunkSize, @Nullable List<Option> options, @Nullable IProgressCallback progressCallback) throws IOException
      Uploads content to remote upload session based on the input stream
      Parameters:
      chunkSize - the customized chunk size
      options - the upload options
      progressCallback - the callback for upload progress
      Returns:
      the result
      Throws:
      IOException - the IO exception that occurred during upload
    • upload

      @Nonnull public LargeFileUploadResult<UploadType> upload(@Nullable int chunkSize, @Nullable List<Option> options) throws IOException
      Uploads content to remote upload session based on the input stream
      Parameters:
      chunkSize - the customized chunk size
      options - the upload options
      Returns:
      the result
      Throws:
      IOException - the IO exception that occurred during upload
    • upload

      @Nonnull public LargeFileUploadResult<UploadType> upload(@Nullable int chunkSize) throws IOException
      Uploads content to remote upload session based on the input stream
      Parameters:
      chunkSize - the customized chunk size
      Returns:
      the result
      Throws:
      IOException - the IO exception that occurred during upload
    • upload

      @Nonnull public LargeFileUploadResult<UploadType> upload() throws IOException
      Uploads content to remote upload session based on the input stream
      Returns:
      the result
      Throws:
      IOException - the IO exception that occurred during upload