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 class
UploadManager.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.UploadRequestBuilder
builder(File file)
Creates a newUploadManager.UploadRequest.UploadRequestBuilder
using the given file.static UploadManager.UploadRequest.UploadRequestBuilder
builder(InputStream stream, long contentLength)
Creates a newUploadManager.UploadRequest.UploadRequestBuilder
using 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.UploadRequestBuilder
using 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
StreamUtils
to 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.UploadRequestBuilder
using 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.
-
-