Class SharedPreferencesBlobStore

java.lang.Object
com.castlabs.sdk.broadpeaks4s.SharedPreferencesBlobStore
All Implemented Interfaces:
BlobStore

public class SharedPreferencesBlobStore extends Object implements BlobStore
A BlobStore implementation that uses SharedPreferences to persist blobs.
  • Constructor Details

    • SharedPreferencesBlobStore

      public SharedPreferencesBlobStore()
      Default constructor.
  • Method Details

    • init

      public void init(Context context)
      Description copied from interface: BlobStore
      Initializes the BlobStore.
      Specified by:
      init in interface BlobStore
      Parameters:
      context - The application context.
    • getBlob

      public String getBlob(String domain)
      Description copied from interface: BlobStore
      Retrieves a blob for the given domain.
      Specified by:
      getBlob in interface BlobStore
      Parameters:
      domain - The domain for which to retrieve the blob.
      Returns:
      The blob as a String, or null if not found.
    • storeBlob

      public void storeBlob(String domain, String blob)
      Description copied from interface: BlobStore
      Stores a blob for the given domain.
      Specified by:
      storeBlob in interface BlobStore
      Parameters:
      domain - The domain for which to store the blob.
      blob - The blob to store.