org.javaswift.joss.instructions
Class UploadInstructions

java.lang.Object
  extended by org.javaswift.joss.instructions.UploadInstructions

public class UploadInstructions
extends Object

Specific instructions for uploading files. You can control the following aspects:


Field Summary
static Long MAX_SEGMENTATION_SIZE
          Maximum segmentation size allowed by the ObjectStore.
 
Constructor Summary
UploadInstructions(byte[] fileToUpload)
           
UploadInstructions(File fileToUpload)
           
UploadInstructions(InputStream inputStream)
           
 
Method Summary
 ObjectContentType getContentType()
           
 DeleteAfter getDeleteAfter()
           
 DeleteAt getDeleteAt()
           
 org.apache.http.HttpEntity getEntity()
           
 Etag getEtag()
           
 String getMd5()
           
 ObjectManifest getObjectManifest()
           
 SegmentationPlan getSegmentationPlan()
          Facade method for determining the segmentation plan of the payload on the basis of the known segmentation size.
 Long getSegmentationSize()
           
 boolean requiresSegmentation()
          Facade method for checking out the payload to see if must be segmented.
 UploadInstructions setContentType(ObjectContentType contentType)
           
 UploadInstructions setContentType(String contentType)
           
 UploadInstructions setDeleteAfter(DeleteAfter deleteAfter)
           
 UploadInstructions setDeleteAt(DeleteAt deleteAt)
           
 UploadInstructions setMd5(String md5)
           
 UploadInstructions setObjectManifest(ObjectManifest objectManifest)
           
 UploadInstructions setSegmentationSize(Long segmentationSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_SEGMENTATION_SIZE

public static Long MAX_SEGMENTATION_SIZE
Maximum segmentation size allowed by the ObjectStore.

Constructor Detail

UploadInstructions

public UploadInstructions(File fileToUpload)

UploadInstructions

public UploadInstructions(InputStream inputStream)

UploadInstructions

public UploadInstructions(byte[] fileToUpload)
Method Detail

requiresSegmentation

public boolean requiresSegmentation()
Facade method for checking out the payload to see if must be segmented. Used internally.

Returns:
true if segmentation is required

getSegmentationPlan

public SegmentationPlan getSegmentationPlan()
Facade method for determining the segmentation plan of the payload on the basis of the known segmentation size. Used internally.

Returns:
full-fledged segmentation plan

setObjectManifest

public UploadInstructions setObjectManifest(ObjectManifest objectManifest)

setMd5

public UploadInstructions setMd5(String md5)

setContentType

public UploadInstructions setContentType(String contentType)

setContentType

public UploadInstructions setContentType(ObjectContentType contentType)

setDeleteAfter

public UploadInstructions setDeleteAfter(DeleteAfter deleteAfter)

setDeleteAt

public UploadInstructions setDeleteAt(DeleteAt deleteAt)

setSegmentationSize

public UploadInstructions setSegmentationSize(Long segmentationSize)

getEntity

public org.apache.http.HttpEntity getEntity()

getSegmentationSize

public Long getSegmentationSize()

getMd5

public String getMd5()

getEtag

public Etag getEtag()
             throws IOException
Throws:
IOException

getObjectManifest

public ObjectManifest getObjectManifest()

getContentType

public ObjectContentType getContentType()

getDeleteAt

public DeleteAt getDeleteAt()

getDeleteAfter

public DeleteAfter getDeleteAfter()


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