Blob

public class Blob implements Comparable


Immutable class representing an array of bytes in Cloud Firestore.

Summary

Public methods

int
boolean
static @NonNull Blob
fromBytes(@NonNull byte[] bytes)

Creates a new Blob instance from the provided bytes.

int
@NonNull byte[]
@NonNull String

Public methods

compareTo

public int compareTo(@NonNull Blob other)

equals

public boolean equals(@Nullable Object other)

fromBytes

public static @NonNull Blob fromBytes(@NonNull byte[] bytes)

Creates a new Blob instance from the provided bytes. Will make a copy of the bytes passed in.

Parameters
@NonNull byte[] bytes

The bytes to use for this Blob instance.

Returns
@NonNull Blob

The new Blob instance

hashCode

public int hashCode()

toBytes

public @NonNull byte[] toBytes()
Returns
@NonNull byte[]

The bytes of this blob as a new byte[] array.

toString

public @NonNull String toString()