public final class Blob implements SerializableImmutable class representing an array of bytes in Firestore.
Implements
SerializableStatic Methods
fromByteString(ByteString byteString)
public static Blob fromByteString(ByteString byteString)Creates a new Blob instance from the provided ByteString.
| Name | Description |
| byteString | ByteStringThe byteString to use for this Blob instance. |
| Type | Description |
| Blob | The new Blob instance |
fromBytes(byte[] bytes)
public static Blob fromBytes(byte[] bytes)Creates a new Blob instance from the provided bytes. Makes a copy of the bytes passed in.
| Name | Description |
| bytes | byte[]The bytes to use for this Blob instance. |
| Type | Description |
| Blob | The new Blob instance |
Methods
equals(Object obj)
public boolean equals(Object obj)Returns true if this Blob is equal to the provided object.
| Name | Description |
| obj | ObjectThe object to compare against. |
| Type | Description |
| boolean | Whether this Blob is equal to the provided object. |
hashCode()
public int hashCode()| Type | Description |
| int |
toByteString()
public ByteString toByteString()Returns the backing data as a ByteString.
| Type | Description |
| ByteString | The bytes of this blob as a byteString |
toBytes()
public byte[] toBytes()Returns a copy of the underlying bytes as a byte[] array.
| Type | Description |
| byte[] | The bytes of this blob as a byte[] array. |