public abstract class C4BlobStore extends C4NativePeer
Modifier and Type | Method and Description |
---|---|
abstract void |
close() |
C4BlobKey |
create(byte[] contents)
Stores a blob.
|
void |
delete() |
void |
delete(C4BlobKey blobKey)
Deletes a blob from the store given its key.
|
FLSliceResult |
getContents(C4BlobKey blobKey)
Reads the entire contents of a blob into memory.
|
String |
getFilePath(C4BlobKey blobKey)
Returns the path of the file that stores the blob, if possible.
|
long |
getSize(C4BlobKey blobKey)
Gets the content size of a blob given its key.
|
static C4BlobStore |
getUnmanagedBlobStore(long peer) |
static C4BlobStore |
open(String dirPath,
long flags) |
C4BlobReadStream |
openReadStream(C4BlobKey blobKey)
Opens a blob for reading, as a random-access byte stream.
|
C4BlobWriteStream |
openWriteStream()
Opens a write stream for creating a new blob.
|
toString
@NonNull public static C4BlobStore getUnmanagedBlobStore(long peer) throws LiteCoreException
LiteCoreException
@NonNull public static C4BlobStore open(@NonNull String dirPath, long flags) throws LiteCoreException
LiteCoreException
public long getSize(@NonNull C4BlobKey blobKey)
@NonNull public FLSliceResult getContents(@NonNull C4BlobKey blobKey) throws LiteCoreException
LiteCoreException
@Nullable public String getFilePath(@NonNull C4BlobKey blobKey) throws LiteCoreException
LiteCoreException
@NonNull public C4BlobKey create(@NonNull byte[] contents) throws LiteCoreException
LiteCoreException
public void delete(@NonNull C4BlobKey blobKey) throws LiteCoreException
LiteCoreException
@NonNull public C4BlobReadStream openReadStream(@NonNull C4BlobKey blobKey) throws LiteCoreException
LiteCoreException
@NonNull public C4BlobWriteStream openWriteStream() throws LiteCoreException
LiteCoreException
public abstract void close()
public void delete() throws LiteCoreException
LiteCoreException