public class WrappingSplitBlobStore extends java.lang.Object implements BlobStoreWrapper, SplitBlobStore
| Constructor and Description |
|---|
WrappingSplitBlobStore(java.lang.String repositoryDir,
BlobStore newBlobStore) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
java.lang.String |
getBlobId(java.lang.String reference)
Returns the blobId that referred by the given binary reference.
|
long |
getBlobLength(java.lang.String blobId)
Get the length of the blob.
|
java.io.InputStream |
getInputStream(java.lang.String blobId)
Returns a new stream for given blobId.
|
java.lang.String |
getReference(java.lang.String blobId)
Returns a secure reference to blob referred by blobid, or
null if no such
reference is available. |
boolean |
isMigrated(java.lang.String blobId) |
int |
readBlob(java.lang.String blobId,
long pos,
byte[] buff,
int off,
int length)
Read a number of bytes from a blob.
|
void |
setBlobStore(BlobStore blobStore) |
java.lang.String |
writeBlob(java.io.InputStream in)
Write a blob from an input stream.
|
java.lang.String |
writeBlob(java.io.InputStream in,
BlobOptions options)
Ignores the options provided and delegates to
writeBlob(InputStream). |
public WrappingSplitBlobStore(java.lang.String repositoryDir,
BlobStore newBlobStore)
public void setBlobStore(BlobStore blobStore)
setBlobStore in interface BlobStoreWrapperpublic java.lang.String writeBlob(java.io.InputStream in)
throws java.io.IOException
BlobStorepublic java.lang.String writeBlob(java.io.InputStream in,
BlobOptions options)
throws java.io.IOException
writeBlob(InputStream).public int readBlob(java.lang.String blobId,
long pos,
byte[] buff,
int off,
int length)
throws java.io.IOException
BlobStorepublic long getBlobLength(java.lang.String blobId)
throws java.io.IOException
BlobStoregetBlobLength in interface BlobStoreblobId - the blob idjava.io.IOExceptionpublic java.io.InputStream getInputStream(java.lang.String blobId)
throws java.io.IOException
BlobStoreread
return the same sequence of bytes as long as neither call throws
an exception.getInputStream in interface BlobStoreblobId - the blob idjava.io.IOExceptionpublic java.lang.String getBlobId(java.lang.String reference)
BlobStorenull if the reference is invalid, for example if it
points to a blob that does not exist.public java.lang.String getReference(java.lang.String blobId)
BlobStorenull if no such
reference is available.getReference in interface BlobStoreblobId - blobId referring the blob for which reference is requirednullpublic boolean isMigrated(java.lang.String blobId)
throws java.io.IOException
isMigrated in interface SplitBlobStorejava.io.IOExceptionpublic void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.ExceptionCopyright © 2010 - 2023 Adobe. All Rights Reserved