public class BlobStore
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ENCRYPTION_ALGORITHM |
static java.lang.String |
ENCRYPTION_MARKER_FILENAME |
static java.lang.String |
FILE_EXTENSION |
static java.lang.String |
TMP_FILE_EXTENSION |
static java.lang.String |
TMP_FILE_PREFIX |
| Constructor and Description |
|---|
BlobStore(Context context,
java.lang.String path,
SymmetricKey encryptionKey) |
BlobStore(Context context,
java.lang.String path,
SymmetricKey encryptionKey,
boolean autoMigrate) |
| Modifier and Type | Method and Description |
|---|---|
Action |
actionToChangeEncryptionKey(SymmetricKey newKey) |
java.util.Set<BlobKey> |
allKeys() |
byte[] |
blobForKey(BlobKey key) |
java.io.InputStream |
blobStreamForKey(BlobKey key) |
void |
changeEncryptionKey(SymmetricKey newKey) |
int |
count() |
int |
deleteBlobs() |
int |
deleteBlobsExceptWithKeys(java.util.List<BlobKey> keysToKeep) |
java.lang.String |
getBlobPathForKey(BlobKey key)
Path to file storing the blob.
|
SymmetricKey |
getEncryptionKey() |
boolean |
getKeyForFilename(BlobKey outKey,
java.lang.String filename) |
java.lang.String |
getPath() |
java.lang.String |
getRawPathForKey(BlobKey key) |
long |
getSizeOfBlob(BlobKey key) |
boolean |
hasBlobForKey(BlobKey key) |
boolean |
isEncrypted() |
boolean |
isGZipped(BlobKey key) |
static BlobKey |
keyForBlob(byte[] data) |
static BlobKey |
keyForBlobFromFile(java.io.File file) |
protected static void |
migrateBlobstoreFilenames(java.io.File directory) |
boolean |
storeBlob(byte[] data,
BlobKey outKey) |
java.io.File |
tempDir() |
long |
totalDataSize() |
public static final java.lang.String FILE_EXTENSION
public static final java.lang.String TMP_FILE_EXTENSION
public static final java.lang.String TMP_FILE_PREFIX
public static final java.lang.String ENCRYPTION_ALGORITHM
public static final java.lang.String ENCRYPTION_MARKER_FILENAME
public BlobStore(Context context, java.lang.String path, SymmetricKey encryptionKey) throws CouchbaseLiteException
CouchbaseLiteExceptionpublic BlobStore(Context context, java.lang.String path, SymmetricKey encryptionKey, boolean autoMigrate) throws CouchbaseLiteException
CouchbaseLiteExceptionpublic Action actionToChangeEncryptionKey(SymmetricKey newKey)
public void changeEncryptionKey(SymmetricKey newKey) throws ActionException
ActionExceptionprotected static void migrateBlobstoreFilenames(java.io.File directory)
public static BlobKey keyForBlob(byte[] data)
public static BlobKey keyForBlobFromFile(java.io.File file)
public java.lang.String getBlobPathForKey(BlobKey key)
key - public java.lang.String getRawPathForKey(BlobKey key)
public long getSizeOfBlob(BlobKey key)
public boolean getKeyForFilename(BlobKey outKey, java.lang.String filename)
public boolean hasBlobForKey(BlobKey key)
public byte[] blobForKey(BlobKey key)
public java.io.InputStream blobStreamForKey(BlobKey key)
public boolean storeBlob(byte[] data,
BlobKey outKey)
public java.util.Set<BlobKey> allKeys()
public int count()
public long totalDataSize()
public int deleteBlobsExceptWithKeys(java.util.List<BlobKey> keysToKeep)
public int deleteBlobs()
public boolean isGZipped(BlobKey key)
public java.io.File tempDir()
public java.lang.String getPath()
public SymmetricKey getEncryptionKey()
public boolean isEncrypted()