Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.javaswift.joss.instructions;
 
 
Encapsulates the payload that must be uploaded to the ObjectStore. The reason this class exists is that it can support in giving information on the payload.

Author(s):
Robert Bor
public abstract class UploadPayload {

    
Returns the payload as an HttpEntity, so it can be uploaded to the ObjectStore

Returns:
HttpEntity of the payload
    public abstract HttpEntity getEntity();

    
Checks whether the payload must be segmented into two or more separate objects to circumvent the max object size

Parameters:
segmentationSize size to check the current payload size against
Returns:
true if the payload must be segmented
    public abstract boolean mustBeSegmented(Long segmentationSize);

    
Returns the MD5 hash value in an Etag header

Returns:
Etag header with MD5 hash
    public abstract Etag getEtag() throws IOException;

    
Sets up the plan to upload the payload in segments

Parameters:
segmentationSize the size of an individual segment
Returns:
the segmentation plan
    public abstract SegmentationPlan getSegmentationPlan(Long segmentationSizethrows IOException;
New to GrepCode? Check out our FAQ X