Package io.minio
Class S3Base
java.lang.Object
io.minio.S3Base
- Direct Known Subclasses:
MinioClient
Core S3 API client.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classNotification result records representation. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HttpUrlprotected static final longprotected static final intprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected Providerprotected Stringprotected static final Stringprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AbortMultipartUploadResponseabortMultipartUpload(String bucketName, String region, String objectName, String uploadId, <any> extraHeaders, <any> extraQueryParams) protected HttpUrlBuild URL for given parameters.protected intcalculatePartCount(List<ComposeSource> sources) Calculate part count of given compose sources.protected voidCheck whether argument is valid or not.protected ObjectWriteResponsecompleteMultipartUpload(String bucketName, String region, String objectName, String uploadId, Part[] parts, <any> extraHeaders, <any> extraQueryParams) protected CreateMultipartUploadResponsecreateMultipartUpload(String bucketName, String region, String objectName, <any> headers, <any> extraQueryParams) protected RequestcreateRequest(HttpUrl url, Method method, Headers headers, Object body, int length, Credentials creds) Create HTTP request for given paramaters.protected DeleteObjectsResponsedeleteObjects(String bucketName, String region, List<DeleteObject> objectList, boolean quiet, boolean bypassGovernanceMode, <any> extraHeaders, <any> extraQueryParams) voidDisables accelerate endpoint for Amazon S3 endpoint.voidDisables dual-stack endpoint for Amazon S3 endpoint.voidDisables virtual-style endpoint.voidEnables accelerate endpoint for Amazon S3 endpoint.voidEnables dual-stack endpoint for Amazon S3 endpoint.voidEnables virtual-style endpoint.protected ResponseExecute HTTP request for given args and parameters.protected Responseexecute(Method method, String bucketName, String objectName, String region, Headers headers, <any> queryParamMap, Object body, int length) Execute HTTP request for given parameters.protected ResponseexecuteDelete(BaseArgs args, <any> headers, <any> queryParams) Execute DELETE HTTP request for given parameters.protected ResponseexecuteGet(BaseArgs args, <any> headers, <any> queryParams) Execute GET HTTP request for given parameters.protected ResponseexecuteHead(BaseArgs args, <any> headers, <any> queryParams) Execute HEAD HTTP request for given parameters.protected ResponseexecutePost(BaseArgs args, <any> headers, <any> queryParams, Object data) Execute POST HTTP request for given parameters.protected ResponseexecutePut(BaseArgs args, <any> headers, <any> queryParams, Object data, int length) Execute PUT HTTP request for given parameters.protected StringReturns region of given bucket either from region cache or set in constructor.protected HeadershttpHeaders(<any> headerMap) Convert Multimap to Headers.voidIgnores check on server certificate for HTTPS connection.protected ListMultipartUploadsResponselistMultipartUploads(String bucketName, String region, String delimiter, String encodingType, String keyMarker, Integer maxUploads, String prefix, String uploadIdMarker, <any> extraHeaders, <any> extraQueryParams) listObjectsV1(ListObjectsArgs args) Execute list objects v1.protected ListObjectsV1ResponselistObjectsV1(String bucketName, String region, String delimiter, String encodingType, String marker, Integer maxKeys, String prefix, <any> extraHeaders, <any> extraQueryParams) listObjectsV2(ListObjectsArgs args) Execute list objects v2.protected ListObjectsV2ResponselistObjectsV2(String bucketName, String region, String delimiter, String encodingType, String startAfter, Integer maxKeys, String prefix, String continuationToken, boolean fetchOwner, boolean includeUserMetadata, <any> extraHeaders, <any> extraQueryParams) Execute list object versions.protected ListObjectVersionsResponselistObjectVersions(String bucketName, String region, String delimiter, String encodingType, String keyMarker, Integer maxKeys, String prefix, String versionIdMarker, <any> extraHeaders, <any> extraQueryParams) protected ListPartsResponselistParts(String bucketName, String region, String objectName, Integer maxParts, Integer partNumberMarker, String uploadId, <any> extraHeaders, <any> extraQueryParams) Do ListParts S3 API.protected <any>merge(<any> m1, <any> m2) Merge two Multimaps.protected <any>newMultimap(<any> map) Create new HashMultimap with copy of Multimap.protected <any>newMultimap(String... keysAndValues) Create new HashMultimap by alternating keys and values.protected <any>newMultimap(Map<String, String> map) Create new HashMultimap with copy of Map.protected ObjectWriteResponseputObject(PutObjectBaseArgs args, Object data, long objectSize, long partSize, int partCount, String contentType) Execute put object.protected ObjectWriteResponseputObject(String bucketName, String region, String objectName, Object data, long length, <any> headers, <any> extraQueryParams) Do PutObject S3 API.voidsetAppInfo(String name, String version) Sets application's name/version to user agent.voidsetTimeout(long connectTimeout, long writeTimeout, long readTimeout) Sets HTTP connect, write and read timeouts.protected StatObjectResponsestatObject(StatObjectArgs args) Execute stat object.voidtraceOff()Disables HTTP call tracing previously enabled.voidtraceOn(OutputStream traceStream) Enables HTTP call tracing and written to traceStream.protected UploadPartResponseuploadPart(String bucketName, String region, String objectName, Object data, long length, String uploadId, int partNumber, <any> extraHeaders, <any> extraQueryParams) protected UploadPartCopyResponseuploadPartCopy(String bucketName, String region, String objectName, String uploadId, int partNumber, <any> headers, <any> extraQueryParams)
-
Field Details
-
NO_SUCH_BUCKET_MESSAGE
- See Also:
-
NO_SUCH_BUCKET
- See Also:
-
NO_SUCH_BUCKET_POLICY
- See Also:
-
NO_SUCH_OBJECT_LOCK_CONFIGURATION
- See Also:
-
SERVER_SIDE_ENCRYPTION_CONFIGURATION_NOT_FOUND_ERROR
- See Also:
-
DEFAULT_CONNECTION_TIMEOUT
protected static final long DEFAULT_CONNECTION_TIMEOUT -
MAX_BUCKET_POLICY_SIZE
protected static final int MAX_BUCKET_POLICY_SIZE- See Also:
-
US_EAST_1
- See Also:
-
regionCache
-
baseUrl
protected HttpUrl baseUrl -
region
-
provider
-
-
Constructor Details
-
S3Base
-
S3Base
-
-
Method Details
-
checkArgs
Check whether argument is valid or not. -
merge
protected <any> merge(<any> m1, <any> m2) Merge two Multimaps. -
newMultimap
Create new HashMultimap by alternating keys and values. -
newMultimap
Create new HashMultimap with copy of Map. -
newMultimap
protected <any> newMultimap(<any> map) Create new HashMultimap with copy of Multimap. -
buildUrl
protected HttpUrl buildUrl(Method method, String bucketName, String objectName, String region, <any> queryParamMap) throws NoSuchAlgorithmException Build URL for given parameters.- Throws:
NoSuchAlgorithmException
-
httpHeaders
protected Headers httpHeaders(<any> headerMap) Convert Multimap to Headers. -
createRequest
protected Request createRequest(HttpUrl url, Method method, Headers headers, Object body, int length, Credentials creds) throws InsufficientDataException, InternalException, IOException, NoSuchAlgorithmException Create HTTP request for given paramaters. -
execute
protected Response execute(Method method, BaseArgs args, <any> headers, <any> queryParams, Object body, int length) throws ErrorResponseException, InsufficientDataException, InternalException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, ServerException, XmlParserException Execute HTTP request for given args and parameters. -
execute
protected Response execute(Method method, String bucketName, String objectName, String region, Headers headers, <any> queryParamMap, Object body, int length) throws ErrorResponseException, InsufficientDataException, InternalException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, ServerException, XmlParserException Execute HTTP request for given parameters. -
getRegion
protected String getRegion(String bucketName, String region) throws ErrorResponseException, InsufficientDataException, InternalException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, ServerException, XmlParserException Returns region of given bucket either from region cache or set in constructor. -
executeGet
protected Response executeGet(BaseArgs args, <any> headers, <any> queryParams) throws ErrorResponseException, InsufficientDataException, InternalException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, ServerException, XmlParserException Execute GET HTTP request for given parameters. -
executeHead
protected Response executeHead(BaseArgs args, <any> headers, <any> queryParams) throws ErrorResponseException, InsufficientDataException, InternalException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, ServerException, XmlParserException Execute HEAD HTTP request for given parameters. -
executeDelete
protected Response executeDelete(BaseArgs args, <any> headers, <any> queryParams) throws ErrorResponseException, InsufficientDataException, InternalException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, ServerException, XmlParserException Execute DELETE HTTP request for given parameters. -
executePost
protected Response executePost(BaseArgs args, <any> headers, <any> queryParams, Object data) throws ErrorResponseException, InsufficientDataException, InternalException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, ServerException, XmlParserException Execute POST HTTP request for given parameters. -
executePut
protected Response executePut(BaseArgs args, <any> headers, <any> queryParams, Object data, int length) throws ErrorResponseException, InsufficientDataException, InternalException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, ServerException, XmlParserException Execute PUT HTTP request for given parameters. -
calculatePartCount
protected int calculatePartCount(List<ComposeSource> sources) throws ErrorResponseException, InsufficientDataException, InternalException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, ServerException, XmlParserException Calculate part count of given compose sources. -
listObjectsV2
Execute list objects v2. -
listObjectsV1
Execute list objects v1. -
listObjectVersions
Execute list object versions. -
putObject
protected ObjectWriteResponse putObject(PutObjectBaseArgs args, Object data, long objectSize, long partSize, int partCount, String contentType) throws ErrorResponseException, InsufficientDataException, InternalException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, ServerException, XmlParserException Execute put object. -
setTimeout
public void setTimeout(long connectTimeout, long writeTimeout, long readTimeout) Sets HTTP connect, write and read timeouts. A value of 0 means no timeout, otherwise values must be between 1 and Integer.MAX_VALUE when converted to milliseconds.Example:
minioClient.setTimeout(TimeUnit.SECONDS.toMillis(10), TimeUnit.SECONDS.toMillis(10), TimeUnit.SECONDS.toMillis(30));- Parameters:
connectTimeout- HTTP connect timeout in milliseconds.writeTimeout- HTTP write timeout in milliseconds.readTimeout- HTTP read timeout in milliseconds.
-
ignoreCertCheck
Ignores check on server certificate for HTTPS connection.Example:
minioClient.ignoreCertCheck();- Throws:
KeyManagementException- thrown to indicate key management error.NoSuchAlgorithmException- thrown to indicate missing of SSL library.
-
setAppInfo
Sets application's name/version to user agent. For more information about user agent refer #rfc2616.- Parameters:
name- Your application name.version- Your application version.
-
traceOn
Enables HTTP call tracing and written to traceStream.- Parameters:
traceStream-OutputStreamfor writing HTTP call tracing.- See Also:
-
traceOff
Disables HTTP call tracing previously enabled.- Throws:
IOException- upon connection error- See Also:
-
enableAccelerateEndpoint
public void enableAccelerateEndpoint()Enables accelerate endpoint for Amazon S3 endpoint. -
disableAccelerateEndpoint
public void disableAccelerateEndpoint()Disables accelerate endpoint for Amazon S3 endpoint. -
enableDualStackEndpoint
public void enableDualStackEndpoint()Enables dual-stack endpoint for Amazon S3 endpoint. -
disableDualStackEndpoint
public void disableDualStackEndpoint()Disables dual-stack endpoint for Amazon S3 endpoint. -
enableVirtualStyleEndpoint
public void enableVirtualStyleEndpoint()Enables virtual-style endpoint. -
disableVirtualStyleEndpoint
public void disableVirtualStyleEndpoint()Disables virtual-style endpoint. -
statObject
protected StatObjectResponse statObject(StatObjectArgs args) throws ErrorResponseException, InsufficientDataException, InternalException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, ServerException, XmlParserException Execute stat object. -
abortMultipartUpload
protected AbortMultipartUploadResponse abortMultipartUpload(String bucketName, String region, String objectName, String uploadId, <any> extraHeaders, <any> extraQueryParams) throws NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, ServerException, XmlParserException, ErrorResponseException, InternalException, InvalidResponseException - Parameters:
bucketName- Name of the bucket.region- Region of the bucket.objectName- Object name in the bucket.uploadId- Upload ID.extraHeaders- Extra headers (Optional).extraQueryParams- Extra query parameters (Optional).- Returns:
AbortMultipartUploadResponseobject.- Throws:
ErrorResponseException- thrown to indicate S3 service returned an error response.InsufficientDataException- thrown to indicate not enough data available in InputStream.InternalException- thrown to indicate internal library error.InvalidKeyException- thrown to indicate missing of HMAC SHA-256 library.InvalidResponseException- thrown to indicate S3 service returned invalid or no error response.IOException- thrown to indicate I/O error on S3 operation.NoSuchAlgorithmException- thrown to indicate missing of MD5 or SHA-256 digest library.XmlParserException- thrown to indicate XML parsing error.ServerException
-
completeMultipartUpload
protected ObjectWriteResponse completeMultipartUpload(String bucketName, String region, String objectName, String uploadId, Part[] parts, <any> extraHeaders, <any> extraQueryParams) throws NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, ServerException, XmlParserException, ErrorResponseException, InternalException, InvalidResponseException - Parameters:
bucketName- Name of the bucket.region- Region of the bucket.objectName- Object name in the bucket.uploadId- Upload ID.parts- List of parts.extraHeaders- Extra headers (Optional).extraQueryParams- Extra query parameters (Optional).- Returns:
ObjectWriteResponseobject.- Throws:
ErrorResponseException- thrown to indicate S3 service returned an error response.InsufficientDataException- thrown to indicate not enough data available in InputStream.InternalException- thrown to indicate internal library error.InvalidKeyException- thrown to indicate missing of HMAC SHA-256 library.InvalidResponseException- thrown to indicate S3 service returned invalid or no error response.IOException- thrown to indicate I/O error on S3 operation.NoSuchAlgorithmException- thrown to indicate missing of MD5 or SHA-256 digest library.XmlParserException- thrown to indicate XML parsing error.ServerException
-
createMultipartUpload
protected CreateMultipartUploadResponse createMultipartUpload(String bucketName, String region, String objectName, <any> headers, <any> extraQueryParams) throws NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, ServerException, XmlParserException, ErrorResponseException, InternalException, InvalidResponseException - Parameters:
bucketName- Name of the bucket.region- Region name of buckets in S3 service.objectName- Object name in the bucket.headers- Request headers.extraQueryParams- Extra query parameters for request (Optional).- Returns:
CreateMultipartUploadResponseobject.- Throws:
ErrorResponseException- thrown to indicate S3 service returned an error response.InsufficientDataException- thrown to indicate not enough data available in InputStream.InternalException- thrown to indicate internal library error.InvalidKeyException- thrown to indicate missing of HMAC SHA-256 library.InvalidResponseException- thrown to indicate S3 service returned invalid or no error response.IOException- thrown to indicate I/O error on S3 operation.NoSuchAlgorithmException- thrown to indicate missing of MD5 or SHA-256 digest library.XmlParserException- thrown to indicate XML parsing error.ServerException
-
deleteObjects
protected DeleteObjectsResponse deleteObjects(String bucketName, String region, List<DeleteObject> objectList, boolean quiet, boolean bypassGovernanceMode, <any> extraHeaders, <any> extraQueryParams) throws NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, ServerException, XmlParserException, ErrorResponseException, InternalException, InvalidResponseException - Parameters:
bucketName- Name of the bucket.region- Region of the bucket (Optional).objectList- List of object names.quiet- Quiet flag.bypassGovernanceMode- Bypass Governance retention mode.extraHeaders- Extra headers for request (Optional).extraQueryParams- Extra query parameters for request (Optional).- Returns:
DeleteObjectsResponseobject.- Throws:
ErrorResponseException- thrown to indicate S3 service returned an error response.InsufficientDataException- thrown to indicate not enough data available in InputStream.InternalException- thrown to indicate internal library error.InvalidKeyException- thrown to indicate missing of HMAC SHA-256 library.InvalidResponseException- thrown to indicate S3 service returned invalid or no error response.IOException- thrown to indicate I/O error on S3 operation.NoSuchAlgorithmException- thrown to indicate missing of MD5 or SHA-256 digest library.XmlParserException- thrown to indicate XML parsing error.ServerException
-
listObjectsV2
protected ListObjectsV2Response listObjectsV2(String bucketName, String region, String delimiter, String encodingType, String startAfter, Integer maxKeys, String prefix, String continuationToken, boolean fetchOwner, boolean includeUserMetadata, <any> extraHeaders, <any> extraQueryParams) throws InvalidKeyException, NoSuchAlgorithmException, InsufficientDataException, ServerException, XmlParserException, ErrorResponseException, InternalException, InvalidResponseException, IOException - Parameters:
bucketName- Name of the bucket.region- Region of the bucket (Optional).delimiter- Delimiter (Optional).encodingType- Encoding type (Optional).startAfter- Fetch listing after this key (Optional).maxKeys- Maximum object information to fetch (Optional).prefix- Prefix (Optional).continuationToken- Continuation token (Optional).fetchOwner- Flag to fetch owner information (Optional).includeUserMetadata- MinIO extension flag to include user metadata (Optional).extraHeaders- Extra headers for request (Optional).extraQueryParams- Extra query parameters for request (Optional).- Returns:
ListObjectsV2Responseobject.- Throws:
ErrorResponseException- thrown to indicate S3 service returned an error response.InsufficientDataException- thrown to indicate not enough data available in InputStream.InternalException- thrown to indicate internal library error.InvalidKeyException- thrown to indicate missing of HMAC SHA-256 library.InvalidResponseException- thrown to indicate S3 service returned invalid or no error response.IOException- thrown to indicate I/O error on S3 operation.NoSuchAlgorithmException- thrown to indicate missing of MD5 or SHA-256 digest library.XmlParserException- thrown to indicate XML parsing error.ServerException
-
listObjectsV1
protected ListObjectsV1Response listObjectsV1(String bucketName, String region, String delimiter, String encodingType, String marker, Integer maxKeys, String prefix, <any> extraHeaders, <any> extraQueryParams) throws NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, ServerException, XmlParserException, ErrorResponseException, InternalException, InvalidResponseException - Parameters:
bucketName- Name of the bucket.region- Region of the bucket (Optional).delimiter- Delimiter (Optional).encodingType- Encoding type (Optional).marker- Marker (Optional).maxKeys- Maximum object information to fetch (Optional).prefix- Prefix (Optional).extraHeaders- Extra headers for request (Optional).extraQueryParams- Extra query parameters for request (Optional).- Returns:
ListObjectsV1Responseobject.- Throws:
ErrorResponseException- thrown to indicate S3 service returned an error response.InsufficientDataException- thrown to indicate not enough data available in InputStream.InternalException- thrown to indicate internal library error.InvalidKeyException- thrown to indicate missing of HMAC SHA-256 library.InvalidResponseException- thrown to indicate S3 service returned invalid or no error response.IOException- thrown to indicate I/O error on S3 operation.NoSuchAlgorithmException- thrown to indicate missing of MD5 or SHA-256 digest library.XmlParserException- thrown to indicate XML parsing error.ServerException
-
listObjectVersions
protected ListObjectVersionsResponse listObjectVersions(String bucketName, String region, String delimiter, String encodingType, String keyMarker, Integer maxKeys, String prefix, String versionIdMarker, <any> extraHeaders, <any> extraQueryParams) throws NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, ServerException, XmlParserException, ErrorResponseException, InternalException, InvalidResponseException - Parameters:
bucketName- Name of the bucket.region- Region of the bucket (Optional).delimiter- Delimiter (Optional).encodingType- Encoding type (Optional).keyMarker- Key marker (Optional).maxKeys- Maximum object information to fetch (Optional).prefix- Prefix (Optional).versionIdMarker- Version ID marker (Optional).extraHeaders- Extra headers for request (Optional).extraQueryParams- Extra query parameters for request (Optional).- Returns:
ListObjectVersionsResponseobject.- Throws:
ErrorResponseException- thrown to indicate S3 service returned an error response.InsufficientDataException- thrown to indicate not enough data available in InputStream.InternalException- thrown to indicate internal library error.InvalidKeyException- thrown to indicate missing of HMAC SHA-256 library.InvalidResponseException- thrown to indicate S3 service returned invalid or no error response.IOException- thrown to indicate I/O error on S3 operation.NoSuchAlgorithmException- thrown to indicate missing of MD5 or SHA-256 digest library.XmlParserException- thrown to indicate XML parsing error.ServerException
-
putObject
protected ObjectWriteResponse putObject(String bucketName, String region, String objectName, Object data, long length, <any> headers, <any> extraQueryParams) throws NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, ServerException, XmlParserException, ErrorResponseException, InternalException, InvalidResponseException Do PutObject S3 API.- Parameters:
bucketName- Name of the bucket.objectName- Object name in the bucket.data- Object data must be InputStream, RandomAccessFile, byte[] or String.length- Length of object data.headers- Additional headers.extraQueryParams- Additional query parameters if any.- Returns:
ObjectWriteResponseobject.- Throws:
ErrorResponseException- thrown to indicate S3 service returned an error response.InsufficientDataException- thrown to indicate not enough data available in InputStream.InternalException- thrown to indicate internal library error.InvalidKeyException- thrown to indicate missing of HMAC SHA-256 library.InvalidResponseException- thrown to indicate S3 service returned invalid or no error response.IOException- thrown to indicate I/O error on S3 operation.NoSuchAlgorithmException- thrown to indicate missing of MD5 or SHA-256 digest library.XmlParserException- thrown to indicate XML parsing error.ServerException
-
listMultipartUploads
protected ListMultipartUploadsResponse listMultipartUploads(String bucketName, String region, String delimiter, String encodingType, String keyMarker, Integer maxUploads, String prefix, String uploadIdMarker, <any> extraHeaders, <any> extraQueryParams) throws NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, ServerException, XmlParserException, ErrorResponseException, InternalException, InvalidResponseException - Parameters:
bucketName- Name of the bucket.region- Region of the bucket (Optional).delimiter- Delimiter (Optional).encodingType- Encoding type (Optional).keyMarker- Key marker (Optional).maxUploads- Maximum upload information to fetch (Optional).prefix- Prefix (Optional).uploadIdMarker- Upload ID marker (Optional).extraHeaders- Extra headers for request (Optional).extraQueryParams- Extra query parameters for request (Optional).- Returns:
ListMultipartUploadsResponseobject.- Throws:
ErrorResponseException- thrown to indicate S3 service returned an error response.InsufficientDataException- thrown to indicate not enough data available in InputStream.InternalException- thrown to indicate internal library error.InvalidKeyException- thrown to indicate missing of HMAC SHA-256 library.InvalidResponseException- thrown to indicate S3 service returned invalid or no error response.IOException- thrown to indicate I/O error on S3 operation.NoSuchAlgorithmException- thrown to indicate missing of MD5 or SHA-256 digest library.XmlParserException- thrown to indicate XML parsing error.ServerException
-
listParts
protected ListPartsResponse listParts(String bucketName, String region, String objectName, Integer maxParts, Integer partNumberMarker, String uploadId, <any> extraHeaders, <any> extraQueryParams) throws NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, ServerException, XmlParserException, ErrorResponseException, InternalException, InvalidResponseException Do ListParts S3 API.- Parameters:
bucketName- Name of the bucket.region- Name of the bucket (Optional).objectName- Object name in the bucket.maxParts- Maximum parts information to fetch (Optional).partNumberMarker- Part number marker (Optional).uploadId- Upload ID.extraHeaders- Extra headers for request (Optional).extraQueryParams- Extra query parameters for request (Optional).- Returns:
ListPartsResponseobject.- Throws:
ErrorResponseException- thrown to indicate S3 service returned an error response.InsufficientDataException- thrown to indicate not enough data available in InputStream.InternalException- thrown to indicate internal library error.InvalidKeyException- thrown to indicate missing of HMAC SHA-256 library.InvalidResponseException- thrown to indicate S3 service returned invalid or no error response.IOException- thrown to indicate I/O error on S3 operation.NoSuchAlgorithmException- thrown to indicate missing of MD5 or SHA-256 digest library.XmlParserException- thrown to indicate XML parsing error.ServerException
-
uploadPart
protected UploadPartResponse uploadPart(String bucketName, String region, String objectName, Object data, long length, String uploadId, int partNumber, <any> extraHeaders, <any> extraQueryParams) throws NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, ServerException, XmlParserException, ErrorResponseException, InternalException, InvalidResponseException - Parameters:
bucketName- Name of the bucket.region- Region of the bucket (Optional).objectName- Object name in the bucket.data- Object data must be InputStream, RandomAccessFile, byte[] or String.length- Length of object data.uploadId- Upload ID.partNumber- Part number.extraHeaders- Extra headers for request (Optional).extraQueryParams- Extra query parameters for request (Optional).- Returns:
- String - Contains ETag.
- Throws:
ErrorResponseException- thrown to indicate S3 service returned an error response.InsufficientDataException- thrown to indicate not enough data available in InputStream.InternalException- thrown to indicate internal library error.InvalidKeyException- thrown to indicate missing of HMAC SHA-256 library.InvalidResponseException- thrown to indicate S3 service returned invalid or no error response.IOException- thrown to indicate I/O error on S3 operation.NoSuchAlgorithmException- thrown to indicate missing of MD5 or SHA-256 digest library.XmlParserException- thrown to indicate XML parsing error.ServerException
-
uploadPartCopy
protected UploadPartCopyResponse uploadPartCopy(String bucketName, String region, String objectName, String uploadId, int partNumber, <any> headers, <any> extraQueryParams) throws NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, ServerException, XmlParserException, ErrorResponseException, InternalException, InvalidResponseException - Parameters:
bucketName- Name of the bucket.region- Region of the bucket (Optional).objectName- Object name in the bucket.uploadId- Upload ID.partNumber- Part number.headers- Request headers with source object definitions.extraQueryParams- Extra query parameters for request (Optional).- Returns:
UploadPartCopyResponseobject.- Throws:
ErrorResponseException- thrown to indicate S3 service returned an error response.InsufficientDataException- thrown to indicate not enough data available in InputStream.InternalException- thrown to indicate internal library error.InvalidKeyException- thrown to indicate missing of HMAC SHA-256 library.InvalidResponseException- thrown to indicate S3 service returned invalid or no error response.IOException- thrown to indicate I/O error on S3 operation.NoSuchAlgorithmException- thrown to indicate missing of MD5 or SHA-256 digest library.XmlParserException- thrown to indicate XML parsing error.ServerException
-