Class UploadManager.UploadRequest
- java.lang.Object
-
- com.oracle.bmc.objectstorage.transfer.UploadManager.UploadRequest
-
- Enclosing class:
- UploadManager
public static class UploadManager.UploadRequest extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUploadManager.UploadRequest.UploadRequestBuilder
-
Constructor Summary
Constructors Constructor Description UploadRequest(PutObjectRequest putObjectRequest, ExecutorService parallelUploadExecutorService, boolean allowOverwrite, ProgressReporter progressReporter)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static UploadManager.UploadRequest.UploadRequestBuilderbuilder(File file)Creates a newUploadManager.UploadRequest.UploadRequestBuilderusing the given file.static UploadManager.UploadRequest.UploadRequestBuilderbuilder(InputStream stream, long contentLength)Creates a newUploadManager.UploadRequest.UploadRequestBuilderusing the given stream and content length.
-
-
-
Constructor Detail
-
UploadRequest
@ConstructorProperties({"putObjectRequest","parallelUploadExecutorService","allowOverwrite","progressReporter"}) public UploadRequest(PutObjectRequest putObjectRequest, ExecutorService parallelUploadExecutorService, boolean allowOverwrite, ProgressReporter progressReporter)
-
-
Method Detail
-
builder
public static UploadManager.UploadRequest.UploadRequestBuilder builder(InputStream stream, long contentLength)
Creates a newUploadManager.UploadRequest.UploadRequestBuilderusing the given stream and content length.The stream and length will be used to create the final put object request.
Note, when providing an InputStream, callers can use
StreamUtilsto help create streams that can be read from in parallel (if multi-part upload is used), which should decrease the time to upload the entire object.- Parameters:
stream- The stream that should be uploaded.contentLength- The content length of the object.- Returns:
- a new UploadRequestBuilder instance.
-
builder
public static UploadManager.UploadRequest.UploadRequestBuilder builder(File file)
Creates a newUploadManager.UploadRequest.UploadRequestBuilderusing the given file.The file and length (derived from
File.length()) will be used to create the final put object request.- Parameters:
file- The file that should be uploaded.- Returns:
- a new UploadRequestBuilder instance.
-
-