public final class MultipartUtils extends Object
Modifier and Type | Field and Description |
---|---|
static long |
MiB |
Modifier and Type | Method and Description |
---|---|
static long |
calculatePartSize(UploadConfiguration config,
long contentLength)
Calculate the part size, in bytes, that should be used per multi-part upload part.
|
static boolean |
shouldCalculateMd5(UploadConfiguration config,
PutObjectRequest request)
Test whether or not the MD5 value should be calculated for the given request when issuing a
single upload (non-multipart) request.
|
static boolean |
shouldUseMultipart(UploadConfiguration config,
long contentLength)
Test whether an object of a given size is large enough to warrant using multi-part uploads.
|
public static final long MiB
public static boolean shouldUseMultipart(@Nonnull UploadConfiguration config, long contentLength)
Test whether an object of a given size is large enough to warrant using multi-part uploads.
config
- The configuration to use.contentLength
- The length of the object in bytes.public static long calculatePartSize(@Nonnull UploadConfiguration config, long contentLength)
Calculate the part size, in bytes, that should be used per multi-part upload part.
config
- The configuration to use.contentLength
- The length of the object in bytes.public static boolean shouldCalculateMd5(@Nonnull UploadConfiguration config, @Nonnull PutObjectRequest request)
Test whether or not the MD5 value should be calculated for the given request when issuing a single upload (non-multipart) request.
config
- The configuration to use.request
- The request being sent.Copyright © 2016–2024. All rights reserved.