public static class

OmletModel.Blobs

extends Object
java.lang.Object
   ↳ mobisocial.omlib.model.OmletModel.Blobs

Class Overview

Binary content shared in Omlet as attachments. The content is stored on disk, although it may or may not be available at a given time.

Retrieve a blob using openInputStream(Uri) or similar. This method will take a long time if the blob must be downloaded. To get the Uri to reference a blob, use uriForBlob(Context, byte[]) , passing the blob's hash. To only load the blob if it exists locally, use uriForBlobLocal(Context, byte[]).

Summary

Fields
protected static final char[] hexArray
Public Constructors
Blobs()
Public Methods
static String bytesToHex(byte[] bytes)
static Uri uriForBlob(Context c, byte[] blobHash, int timeoutSeconds)
A uri that can be used to retrieve a blob from the Omlet system.
static Uri uriForBlob(Context c, byte[] blobHash)
A uri that can be used to retrieve a blob from the Omlet system.
static Uri uriForBlobLink(Context c, String blobLink)
A uri that can be used to retrieve a blob from the Omlet system.
static Uri uriForBlobLocal(Context c, byte[] blobHash)
Returns a Uri that can be used to load an Omlet blob, only if that blob already exists on the local device.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected static final char[] hexArray

Public Constructors

public Blobs ()

Public Methods

public static String bytesToHex (byte[] bytes)

public static Uri uriForBlob (Context c, byte[] blobHash, int timeoutSeconds)

A uri that can be used to retrieve a blob from the Omlet system. When retrieved, the content provider or service will return data immediately if the blob is available on the local device. Otherwise, Omlet will attempt to fetch the blob using the network.

public static Uri uriForBlob (Context c, byte[] blobHash)

A uri that can be used to retrieve a blob from the Omlet system. When retrieved, the content provider or service will return data immediately if the blob is available on the local device. Otherwise, Omlet will attempt to fetch the blob using the network.

public static Uri uriForBlobLink (Context c, String blobLink)

A uri that can be used to retrieve a blob from the Omlet system. When retrieved, the content provider or service will return data immediately if the blob is available on the local device. Otherwise, Omlet will attempt to fetch the blob using the network. This method will also attach the given blobLink to it's blobHash

Parameters
blobLink can not be passed in as null

public static Uri uriForBlobLocal (Context c, byte[] blobHash)

Returns a Uri that can be used to load an Omlet blob, only if that blob already exists on the local device.