org.javaswift.joss.instructions
Class UploadPayloadByteArray

java.lang.Object
  extended by org.javaswift.joss.instructions.UploadPayload
      extended by org.javaswift.joss.instructions.UploadPayloadByteArray

public class UploadPayloadByteArray
extends UploadPayload


Constructor Summary
UploadPayloadByteArray(byte[] bytes)
           
 
Method Summary
 org.apache.http.HttpEntity getEntity()
          Returns the payload as an HttpEntity, so it can be uploaded to the ObjectStore
 Etag getEtag()
          Returns the MD5 hash value in an Etag header
 SegmentationPlan getSegmentationPlan(Long segmentationSize)
          Sets up the plan to upload the payload in segments
 boolean mustBeSegmented(Long segmentationSize)
          Checks whether the payload must be segmented into two or more separate objects to circumvent the max object size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UploadPayloadByteArray

public UploadPayloadByteArray(byte[] bytes)
Method Detail

getEntity

public org.apache.http.HttpEntity getEntity()
Description copied from class: UploadPayload
Returns the payload as an HttpEntity, so it can be uploaded to the ObjectStore

Specified by:
getEntity in class UploadPayload
Returns:
HttpEntity of the payload

mustBeSegmented

public boolean mustBeSegmented(Long segmentationSize)
Description copied from class: UploadPayload
Checks whether the payload must be segmented into two or more separate objects to circumvent the max object size

Specified by:
mustBeSegmented in class UploadPayload
Parameters:
segmentationSize - size to check the current payload size against
Returns:
true if the payload must be segmented

getEtag

public Etag getEtag()
             throws IOException
Description copied from class: UploadPayload
Returns the MD5 hash value in an Etag header

Specified by:
getEtag in class UploadPayload
Returns:
Etag header with MD5 hash
Throws:
IOException

getSegmentationPlan

public SegmentationPlan getSegmentationPlan(Long segmentationSize)
                                     throws IOException
Description copied from class: UploadPayload
Sets up the plan to upload the payload in segments

Specified by:
getSegmentationPlan in class UploadPayload
Parameters:
segmentationSize - the size of an individual segment
Returns:
the segmentation plan
Throws:
IOException


Copyright © 2012-2014 42 BV. All Rights Reserved.