Class Blob (2.0.0)

public final class Blob implements Serializable

Blob contains an array of bytes. This byte array can be no bigger than 1MB. To store files, particularly files larger than this 1MB limit, look at the Blobstore API.

Inheritance

java.lang.Object > Blob

Implements

Serializable

Constructors

Blob(byte[] bytes)

public Blob(byte[] bytes)

Construct a new Blob with the specified bytes. Since Blobs can be quite large we do not perform a defensive copy of the provided byte array. It is the programmer's responsibility to avoid making changes to this array once the Blob has been constructed.

Parameter
Name Description
bytes byte[]

Methods

equals(@Nullable Object object)

public boolean equals(@Nullable Object object)

Two Blob objects are considered equal if their contained bytes match exactly.

Parameter
Name Description
object @org.checkerframework.checker.nullness.qual.Nullable java.lang.Object
Returns
Type Description
boolean
Overrides

getBytes()

public byte[] getBytes()

Return the bytes stored in this Blob.

Returns
Type Description
byte[]

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

toString()

public String toString()

Simply prints the number of bytes contained in this Blob.

Returns
Type Description
String
Overrides