Package org.jclouds.s3.filters
Class ChunkedUploadPayload
- java.lang.Object
-
- org.jclouds.io.payloads.BasePayload<Payload>
-
- org.jclouds.s3.filters.ChunkedUploadPayload
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Payload
public class ChunkedUploadPayload extends BasePayload<Payload>
-
-
Field Summary
-
Fields inherited from class org.jclouds.io.payloads.BasePayload
content, contentMetadata, written
-
-
Constructor Summary
Constructors Constructor Description ChunkedUploadPayload(Payload payload, int blockSize, String timestamp, String scope, com.google.common.io.ByteProcessor<byte[]> hmacSHA256, String seedSignature)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]
constructSignedChunk(int userDataLen, byte[] userData)
Returns a chunk for upload consisting of the signed 'header' or chunk prefix plus the user data.boolean
isRepeatable()
By default we are repeatable.InputStream
openStream()
Creates a new InputStream object of the payload.void
release()
By default there are no resources to release.-
Methods inherited from class org.jclouds.io.payloads.BasePayload
close, equals, getContentMetadata, getInput, getRawContent, hashCode, isSensitive, setContentMetadata, setSensitive, toString
-
-
-
-
Method Detail
-
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()
Description copied from class:BasePayload
By default there are no resources to release.- Specified by:
release
in interfacePayload
- Overrides:
release
in classBasePayload<Payload>
-
isRepeatable
public boolean isRepeatable()
Description copied from class:BasePayload
By default we are repeatable.- Specified by:
isRepeatable
in interfacePayload
- Overrides:
isRepeatable
in classBasePayload<Payload>
-
openStream
public InputStream openStream() throws IOException
Description copied from interface:Payload
Creates a new InputStream object of the payload.- Throws:
IOException
-
-