Package com.microsoft.graph.tasks
Class LargeFileUploadTask<UploadType>
java.lang.Object
com.microsoft.graph.tasks.LargeFileUploadTask<UploadType>
- Type Parameters:
UploadType- the upload item type
ChunkedUpload service provider
-
Constructor Summary
ConstructorsConstructorDescriptionLargeFileUploadTask(IUploadSession uploadSession, IBaseClient<?> client, InputStream inputStream, long streamSize, Class<UploadType> uploadTypeClass) Creates the ChunkedUploadProvider -
Method Summary
Modifier and TypeMethodDescriptionupload()Uploads content to remote upload session based on the input streamupload(int chunkSize) Uploads content to remote upload session based on the input streamUploads content to remote upload session based on the input streamupload(int chunkSize, List<Option> options, IProgressCallback progressCallback) Uploads content to remote upload session based on the input streamUploads content to remote upload session based on the input streamuploadAsync(int chunkSize) Uploads content to remote upload session based on the input streamuploadAsync(int chunkSize, List<Option> options) Uploads content to remote upload session based on the input streamuploadAsync(int chunkSize, List<Option> options, IProgressCallback progressCallback) Uploads content to remote upload session based on the input stream
-
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 sessionclient- the Graph clientinputStream- the input streamstreamSize- the stream sizeuploadTypeClass- 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 sizeoptions- the upload optionsprogressCallback- 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 IOExceptionUploads 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 sizeoptions- 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 sizeoptions- the upload optionsprogressCallback- 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 sizeoptions- 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
Uploads content to remote upload session based on the input stream- Returns:
- the result
- Throws:
IOException- the IO exception that occurred during upload
-