public final class JcloudsBlobStoreHelper extends Object
Modifier and Type | Method and Description |
---|---|
static void |
clearContainer(org.jclouds.blobstore.BlobStore blobStore,
String container)
Clear a
BlobStore specific container |
static boolean |
containerExists(org.jclouds.blobstore.BlobStore blobStore,
String container)
Check if a
BlobStore specific container exists or not |
static long |
countBlob(org.jclouds.blobstore.BlobStore blobStore,
String container)
Return the count of all the blobs in the container
|
static void |
deleteContainer(org.jclouds.blobstore.BlobStore blobStore,
String container)
Delete a
BlobStore specific container |
static void |
ensureContainerExists(org.jclouds.blobstore.BlobStore blobStore,
String container,
String locationId)
Checks if container exists and creates one if not.
|
static org.jclouds.domain.Location |
getLocationById(org.jclouds.blobstore.BlobStore blobStore,
String locationId)
Returns the
Location that matches the locationId. |
static void |
mkDirs(org.jclouds.blobstore.BlobStore blobStore,
String container,
String blobName)
Creates all directories that are part of the blobName.
|
static InputStream |
readBlob(org.jclouds.blobstore.BlobStore blobStore,
String container,
String blobName)
Reads from a
BlobStore . |
static void |
removeBlob(org.jclouds.blobstore.BlobStore blobStore,
String container,
String blobName)
Remove a specific blob from a
BlobStore |
static void |
removeBlobs(org.jclouds.blobstore.BlobStore blobStore,
String container,
List blobNames)
Delete a list of
BlobStore blob |
static void |
writeBlob(org.jclouds.blobstore.BlobStore blobStore,
String container,
String blobName,
org.jclouds.io.Payload payload)
Writes
Payload to the the BlobStore . |
public static void mkDirs(org.jclouds.blobstore.BlobStore blobStore, String container, String blobName)
public static void ensureContainerExists(org.jclouds.blobstore.BlobStore blobStore, String container, String locationId)
blobStore
- The BlobStore
to use.container
- The container name to check against.locationId
- The locationId to create the container if not found.public static org.jclouds.domain.Location getLocationById(org.jclouds.blobstore.BlobStore blobStore, String locationId)
Location
that matches the locationId.public static void writeBlob(org.jclouds.blobstore.BlobStore blobStore, String container, String blobName, org.jclouds.io.Payload payload)
Payload
to the the BlobStore
.public static InputStream readBlob(org.jclouds.blobstore.BlobStore blobStore, String container, String blobName) throws IOException
BlobStore
. It returns an Object.IOException
public static long countBlob(org.jclouds.blobstore.BlobStore blobStore, String container)
public static void removeBlob(org.jclouds.blobstore.BlobStore blobStore, String container, String blobName) throws IOException
BlobStore
IOException
public static void clearContainer(org.jclouds.blobstore.BlobStore blobStore, String container) throws IOException
BlobStore
specific containerIOException
public static void deleteContainer(org.jclouds.blobstore.BlobStore blobStore, String container) throws IOException
BlobStore
specific containerIOException
public static boolean containerExists(org.jclouds.blobstore.BlobStore blobStore, String container) throws IOException
BlobStore
specific container exists or notIOException
public static void removeBlobs(org.jclouds.blobstore.BlobStore blobStore, String container, List blobNames) throws IOException
BlobStore
blobIOException
Apache Camel