Package org.jclouds.s3.filters
Class ChunkedUploadPayload
java.lang.Object
org.jclouds.io.payloads.BasePayload<org.jclouds.io.Payload>
org.jclouds.s3.filters.ChunkedUploadPayload
- All Implemented Interfaces:
Closeable,AutoCloseable,org.jclouds.io.Payload
public class ChunkedUploadPayload
extends org.jclouds.io.payloads.BasePayload<org.jclouds.io.Payload>
-
Field Summary
Fields inherited from class org.jclouds.io.payloads.BasePayload
content, contentMetadata, written -
Constructor Summary
ConstructorsConstructorDescriptionChunkedUploadPayload(org.jclouds.io.Payload payload, int blockSize, String timestamp, String scope, com.google.common.io.ByteProcessor<byte[]> hmacSHA256, String seedSignature) -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]constructSignedChunk(int userDataLen, byte[] userData) Returns a chunk for upload consisting of the signed 'header' or chunk prefix plus the user data.booleanvoidrelease()Methods inherited from class org.jclouds.io.payloads.BasePayload
close, equals, getContentMetadata, getInput, getRawContent, hashCode, isSensitive, setContentMetadata, setSensitive, toString
-
Constructor Details
-
ChunkedUploadPayload
-
-
Method Details
-
constructSignedChunk
protected byte[] constructSignedChunk(int userDataLen, byte[] userData) Returns a chunk for upload consisting of the signed 'header' or chunk prefix plus the user data. The signature of the chunk incorporates the signature of the previous chunk (or, if the first chunk, the signature of the headers portion of the request).- Parameters:
userDataLen- The length of the user data contained in userDatauserData- Contains the user data to be sent in the upload chunk- Returns:
- A new buffer of data for upload containing the chunk header plus user data
-
release
public void release()- Specified by:
releasein interfaceorg.jclouds.io.Payload- Overrides:
releasein classorg.jclouds.io.payloads.BasePayload<org.jclouds.io.Payload>
-
isRepeatable
public boolean isRepeatable()- Specified by:
isRepeatablein interfaceorg.jclouds.io.Payload- Overrides:
isRepeatablein classorg.jclouds.io.payloads.BasePayload<org.jclouds.io.Payload>
-
openStream
- Throws:
IOException
-