org.jclouds.blobstore.domain.internal
Class BlobBuilderImpl.PayloadBlobBuilderImpl

java.lang.Object
  extended by org.jclouds.blobstore.domain.internal.BlobBuilderImpl.PayloadBlobBuilderImpl
All Implemented Interfaces:
BlobBuilder, BlobBuilder.PayloadBlobBuilder
Enclosing class:
BlobBuilderImpl

public class BlobBuilderImpl.PayloadBlobBuilderImpl
extends Object
implements BlobBuilder.PayloadBlobBuilder


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jclouds.blobstore.domain.BlobBuilder
BlobBuilder.PayloadBlobBuilder
 
Constructor Summary
BlobBuilderImpl.PayloadBlobBuilderImpl(BlobBuilder builder, Payload payload, Crypto crypto)
           
 
Method Summary
 Blob build()
          This makes a blob from the currently configured parameters.
 BlobBuilder.PayloadBlobBuilder calculateMD5()
           
 BlobBuilder.PayloadBlobBuilder contentDisposition(String contentDisposition)
           
 BlobBuilder.PayloadBlobBuilder contentEncoding(String contentEncoding)
           
 BlobBuilder.PayloadBlobBuilder contentLanguage(String contentLanguage)
           
 BlobBuilder.PayloadBlobBuilder contentLength(long contentLength)
           
 BlobBuilder.PayloadBlobBuilder contentMD5(byte[] md5)
           
 BlobBuilder.PayloadBlobBuilder contentType(String contentType)
           
 BlobBuilder.PayloadBlobBuilder forSigning()
          If you are creating a blob only for signing, use this.
 BlobBuilder name(String name)
           
 BlobBuilder.PayloadBlobBuilder payload(byte[] payload)
           
 BlobBuilder.PayloadBlobBuilder payload(File payload)
           
 BlobBuilder.PayloadBlobBuilder payload(InputStream payload)
           
 BlobBuilder.PayloadBlobBuilder payload(Payload payload)
           
 BlobBuilder.PayloadBlobBuilder payload(String payload)
           
 BlobBuilder type(StorageType type)
           
 BlobBuilder userMetadata(Map<String,String> userMetadata)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlobBuilderImpl.PayloadBlobBuilderImpl

public BlobBuilderImpl.PayloadBlobBuilderImpl(BlobBuilder builder,
                                              Payload payload,
                                              Crypto crypto)
Method Detail

name

public BlobBuilder name(String name)
Specified by:
name in interface BlobBuilder
Parameters:
name - The name of the Blob. Typically refers to an http path.

type

public BlobBuilder type(StorageType type)
Specified by:
type in interface BlobBuilder
Parameters:
type - overrides default type of StorageType.BLOB

userMetadata

public BlobBuilder userMetadata(Map<String,String> userMetadata)
Specified by:
userMetadata in interface BlobBuilder
Parameters:
userMetadata - User defined metadata associated with this Blob.

payload

public BlobBuilder.PayloadBlobBuilder payload(Payload payload)
Specified by:
payload in interface BlobBuilder
Parameters:
payload - payload you wish to construct the Blob with.

calculateMD5

public BlobBuilder.PayloadBlobBuilder calculateMD5()
                                            throws IOException
Specified by:
calculateMD5 in interface BlobBuilder.PayloadBlobBuilder
Throws:
IOException
See Also:
Payloads.calculateMD5(org.jclouds.io.Payload, java.security.MessageDigest)

payload

public BlobBuilder.PayloadBlobBuilder payload(InputStream payload)
Specified by:
payload in interface BlobBuilder
Parameters:
payload - payload you wish to construct the Blob with.

payload

public BlobBuilder.PayloadBlobBuilder payload(byte[] payload)
Specified by:
payload in interface BlobBuilder
Parameters:
payload - payload you wish to construct the Blob with.

payload

public BlobBuilder.PayloadBlobBuilder payload(String payload)
Specified by:
payload in interface BlobBuilder
Parameters:
payload - payload you wish to construct the Blob with.

payload

public BlobBuilder.PayloadBlobBuilder payload(File payload)
Specified by:
payload in interface BlobBuilder
Parameters:
payload - payload you wish to construct the Blob with.

build

public Blob build()
Description copied from interface: BlobBuilder
This makes a blob from the currently configured parameters.

Specified by:
build in interface BlobBuilder
Returns:
a new blob from the current parameters

contentLength

public BlobBuilder.PayloadBlobBuilder contentLength(long contentLength)
Specified by:
contentLength in interface BlobBuilder.PayloadBlobBuilder

contentMD5

public BlobBuilder.PayloadBlobBuilder contentMD5(byte[] md5)
Specified by:
contentMD5 in interface BlobBuilder.PayloadBlobBuilder

contentType

public BlobBuilder.PayloadBlobBuilder contentType(String contentType)
Specified by:
contentType in interface BlobBuilder.PayloadBlobBuilder

contentDisposition

public BlobBuilder.PayloadBlobBuilder contentDisposition(String contentDisposition)
Specified by:
contentDisposition in interface BlobBuilder.PayloadBlobBuilder

contentLanguage

public BlobBuilder.PayloadBlobBuilder contentLanguage(String contentLanguage)
Specified by:
contentLanguage in interface BlobBuilder.PayloadBlobBuilder

contentEncoding

public BlobBuilder.PayloadBlobBuilder contentEncoding(String contentEncoding)
Specified by:
contentEncoding in interface BlobBuilder.PayloadBlobBuilder

forSigning

public BlobBuilder.PayloadBlobBuilder forSigning()
Description copied from interface: BlobBuilder
If you are creating a blob only for signing, use this. BlobRequestSigner

Specified by:
forSigning in interface BlobBuilder


Copyright © 2009-2011 jclouds. All Rights Reserved.