Package com.castlabs.sdk.broadpeaks4s

# 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 Summary

  Constructors
  Constructor
  Description
  `SharedPreferencesBlobStore()`
  Default constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getBlob(String domain)`
  Retrieves a blob for the given domain.
  `void`
  `init(Context context)`
  Initializes the BlobStore.
  `void`
  `storeBlob(String domain, String blob)`
  Stores a blob for the given domain.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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.