org.jclouds.blobstore.util
Class BlobStoreUtils

java.lang.Object
  extended by org.jclouds.blobstore.util.BlobStoreUtils

public class BlobStoreUtils
extends Object

Author:
Adrian Cole

Field Summary
static ExceptionToValueOrPropagate<ContainerNotFoundException,?> containerNotFoundToNullOrPropagate
           
static ExceptionToValueOrPropagate<KeyNotFoundException,?> keyNotFoundToNullOrPropagate
           
 
Constructor Summary
BlobStoreUtils()
           
 
Method Summary
static
<T> HttpRequest
cleanRequest(HttpRequest returnVal)
           
static
<T> T
containerNotFoundToNullOrPropagate(Exception e)
           
static com.google.common.util.concurrent.ListenableFuture<Void> createParentIfNeededAsync(AsyncBlobStore asyncBlobStore, String container, Blob blob)
           
static String getContentAsStringOrNullAndClose(Blob blob)
           
static String getNameFor(GeneratedHttpRequest<?> request)
           
static Iterable<String> getSupportedProviders()
           
static
<T> T
keyNotFoundToNullOrPropagate(Exception e)
           
static Blob newBlob(BlobStore blobStore, StorageMetadata blobMeta)
           
static String parseContainerFromPath(String path)
           
static String parseDirectoryFromPath(String path)
           
static String parsePrefixFromPath(String path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

keyNotFoundToNullOrPropagate

public static final ExceptionToValueOrPropagate<KeyNotFoundException,?> keyNotFoundToNullOrPropagate

containerNotFoundToNullOrPropagate

public static final ExceptionToValueOrPropagate<ContainerNotFoundException,?> containerNotFoundToNullOrPropagate
Constructor Detail

BlobStoreUtils

public BlobStoreUtils()
Method Detail

cleanRequest

public static <T> HttpRequest cleanRequest(HttpRequest returnVal)

keyNotFoundToNullOrPropagate

public static <T> T keyNotFoundToNullOrPropagate(Exception e)

containerNotFoundToNullOrPropagate

public static <T> T containerNotFoundToNullOrPropagate(Exception e)

newBlob

public static Blob newBlob(BlobStore blobStore,
                           StorageMetadata blobMeta)

parseContainerFromPath

public static String parseContainerFromPath(String path)

parsePrefixFromPath

public static String parsePrefixFromPath(String path)

parseDirectoryFromPath

public static String parseDirectoryFromPath(String path)

getNameFor

public static String getNameFor(GeneratedHttpRequest<?> request)

getContentAsStringOrNullAndClose

public static String getContentAsStringOrNullAndClose(Blob blob)
                                               throws IOException
Throws:
IOException

createParentIfNeededAsync

public static com.google.common.util.concurrent.ListenableFuture<Void> createParentIfNeededAsync(AsyncBlobStore asyncBlobStore,
                                                                                                 String container,
                                                                                                 Blob blob)

getSupportedProviders

public static Iterable<String> getSupportedProviders()


Copyright © 2009-2011 jclouds. All Rights Reserved.