-
- All Implemented Interfaces:
-
java.io.Serializable,java.lang.Comparable
public enum ParcelableMemoryCacheInternal use only.
This singleton cache keeps references to byte arrays and Bitmaps to be preserved between parceling and unparceling.
This solution is needed because it is not possible to pass large byte arrays and Bitmaps via Intents.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classParcelableMemoryCache.TokenOpaque tokenId type to identify a document.
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Method Summary
Modifier and Type Method Description Array<byte>getByteArray(@NonNull() ParcelableMemoryCache.Token token)ParcelableMemoryCache.TokenstoreByteArray(@NonNull() Array<byte> documentJpeg)ParcelableMemoryCache.TokenstoreByteArray(@NonNull() Array<byte> documentJpeg, @NonNull() String tag)voidremoveByteArray(@NonNull() ParcelableMemoryCache.Token token)voidremoveEntriesWithTag(@NonNull() String tag)BitmapgetBitmap(@NonNull() ParcelableMemoryCache.Token token)ParcelableMemoryCache.TokenstoreBitmap(@Nullable() Bitmap documentBitmap)ParcelableMemoryCache.TokenstoreBitmap(@Nullable() Bitmap documentBitmap, @NonNull() String tag)voidremoveBitmap(@NonNull() ParcelableMemoryCache.Token token)static ParcelableMemoryCachegetInstance()static Array<ParcelableMemoryCache>values()static ParcelableMemoryCachevalueOf(String name)-
-
Method Detail
-
getByteArray
Array<byte> getByteArray(@NonNull() ParcelableMemoryCache.Token token)
-
storeByteArray
@NonNull() ParcelableMemoryCache.Token storeByteArray(@NonNull() Array<byte> documentJpeg)
-
storeByteArray
@NonNull() ParcelableMemoryCache.Token storeByteArray(@NonNull() Array<byte> documentJpeg, @NonNull() String tag)
-
removeByteArray
void removeByteArray(@NonNull() ParcelableMemoryCache.Token token)
-
removeEntriesWithTag
void removeEntriesWithTag(@NonNull() String tag)
-
getBitmap
@Nullable() Bitmap getBitmap(@NonNull() ParcelableMemoryCache.Token token)
-
storeBitmap
@NonNull() ParcelableMemoryCache.Token storeBitmap(@Nullable() Bitmap documentBitmap)
-
storeBitmap
@NonNull() ParcelableMemoryCache.Token storeBitmap(@Nullable() Bitmap documentBitmap, @NonNull() String tag)
-
removeBitmap
void removeBitmap(@NonNull() ParcelableMemoryCache.Token token)
-
getInstance
@NonNull() static ParcelableMemoryCache getInstance()
-
values
static Array<ParcelableMemoryCache> values()
-
valueOf
static ParcelableMemoryCache valueOf(String name)
-
-
-
-