Blob

classBlob :Comparable


Immutable class representing an array of bytes in Cloud Firestore.

Summary

Public functions

Int
compareTo(other: Blob)
Boolean
equals(other: Any?)
java-staticBlob

Creates a newBlob instance from the provided bytes.

Int
ByteArray<Byte>
String

Public functions

compareTo

fun compareTo(other: Blob): Int

equals

fun equals(other: Any?): Boolean

fromBytes

java-static fun fromBytes(bytes: ByteArray): Blob

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

Parameters
bytes: ByteArray

The bytes to use for thisBlob instance.

Returns
Blob

The newBlob instance

hashCode

fun hashCode(): Int

toBytes

fun toBytes(): ByteArray<Byte>
Returns
ByteArray<Byte>

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

toString

fun toString(): String

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-21 UTC.