public class Aws4SignerForChunkedUpload extends Aws4SignerBase
Aws4SignerBase.ServiceAndRegion
creds, crypto, dateFormat, headerTag, serviceAndRegion, signatureWire, timestampFormat, timestampProvider
Constructor and Description |
---|
Aws4SignerForChunkedUpload(SignatureWire signatureWire,
String headerTag,
int userDataBlockSize,
com.google.common.base.Supplier<Credentials> creds,
com.google.common.base.Supplier<Date> timestampProvider,
Aws4SignerBase.ServiceAndRegion serviceAndRegion,
Crypto crypto) |
Modifier and Type | Method and Description |
---|---|
static long |
calculateChunkedContentLength(long originalLength,
long chunkSize)
Calculates the expanded payload size of our data when it is chunked
|
protected String |
getPayloadHash() |
protected HttpRequest |
sign(HttpRequest request) |
appendAmzHeaders, createStringToSign, getCanonicalizedQueryString, getContentLength, getContentType, hash, hash, hash, hex, hmacSHA256, hmacSHA256, lowerCaseNaturalOrderKeys, signatureKey, urlEncode
@Inject public Aws4SignerForChunkedUpload(SignatureWire signatureWire, @Named(value="jclouds.aws.header.tag") String headerTag, @Named(value="jclouds.s3.chunked.size") int userDataBlockSize, com.google.common.base.Supplier<Credentials> creds, com.google.common.base.Supplier<Date> timestampProvider, Aws4SignerBase.ServiceAndRegion serviceAndRegion, Crypto crypto)
protected HttpRequest sign(HttpRequest request) throws HttpException
HttpException
protected String getPayloadHash()
public static long calculateChunkedContentLength(long originalLength, long chunkSize)
originalLength
- The true size of the data payload to be uploadedchunkSize
- The size of each chunk we intend to send; each chunk will be
prefixed with signed header data, expanding the overall size
by a determinable amountCopyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.