public class URLBlobContainer extends AbstractBlobContainer
BlobContainer| Modifier and Type | Field and Description |
|---|---|
protected URLBlobStore |
blobStore |
protected URL |
path |
| Constructor and Description |
|---|
URLBlobContainer(URLBlobStore blobStore,
BlobPath blobPath,
URL path)
Constructs new URLBlobContainer
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
blobExists(String blobName)
This operation is not supported by URLBlobContainer
|
void |
deleteBlob(String blobName)
This operation is not supported by URLBlobContainer
|
com.google.common.collect.ImmutableMap<String,BlobMetaData> |
listBlobs()
This operation is not supported by URLBlobContainer
|
com.google.common.collect.ImmutableMap<String,BlobMetaData> |
listBlobsByPrefix(String blobNamePrefix)
This operation is not supported by URLBlobContainer
|
void |
move(String from,
String to)
Atomically renames source blob into target blob
|
InputStream |
readBlob(String name)
Creates a new InputStream for the given blob name
|
URL |
url()
Returns URL for this container
|
void |
writeBlob(String blobName,
BytesReference data)
Writes bytes to the blob
|
void |
writeBlob(String blobName,
InputStream inputStream,
long blobSize)
Reads blob content from the input stream and writes it to the blob store
|
deleteBlobs, deleteBlobsByPrefix, pathprotected final URLBlobStore blobStore
protected final URL path
public URLBlobContainer(URLBlobStore blobStore, BlobPath blobPath, URL path)
blobStore - blob storeblobPath - blob path for this containerpath - URL for this containerpublic URL url()
public com.google.common.collect.ImmutableMap<String,BlobMetaData> listBlobs() throws IOException
IOExceptionpublic com.google.common.collect.ImmutableMap<String,BlobMetaData> listBlobsByPrefix(String blobNamePrefix) throws IOException
IOExceptionpublic void move(String from, String to) throws IOException
BlobContainerIOExceptionpublic void deleteBlob(String blobName) throws IOException
IOExceptionpublic boolean blobExists(String blobName)
public InputStream readBlob(String name) throws IOException
BlobContainerIOExceptionpublic void writeBlob(String blobName, InputStream inputStream, long blobSize) throws IOException
BlobContainerIOExceptionpublic void writeBlob(String blobName, BytesReference data) throws IOException
BlobContainerIOExceptionCopyright © 2009–2017. All rights reserved.