ShortBlob contains an array of bytes no longer than DataTypeUtils#MAX_SHORT_BLOB_PROPERTY_LENGTH. Unlike Blob, ShortBlobs are
indexed by the datastore and can therefore be filtered and sorted on in queries. If your data is
too large to fit in a ShortBlob use Blob instead.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[[["\u003cp\u003e\u003ccode\u003eShortBlob\u003c/code\u003e is a class that stores an array of bytes, with a size limitation defined by \u003ccode\u003eDataTypeUtils#MAX_SHORT_BLOB_PROPERTY_LENGTH\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eUnlike \u003ccode\u003eBlob\u003c/code\u003e, \u003ccode\u003eShortBlob\u003c/code\u003e data is indexed, allowing for filtering and sorting within datastore queries.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eShortBlob\u003c/code\u003e implements the \u003ccode\u003eSerializable\u003c/code\u003e and \u003ccode\u003eComparable<ShortBlob>\u003c/code\u003e interfaces.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eShortBlob\u003c/code\u003e objects are immutable after construction, with the bytes being set during initialization.\u003c/p\u003e\n"],["\u003cp\u003eIf the data exceeds the \u003ccode\u003eShortBlob\u003c/code\u003e size limit, \u003ccode\u003eBlob\u003c/code\u003e should be used instead.\u003c/p\u003e\n"]]],[],null,["# Class ShortBlob (2.0.0)\n\n public final class ShortBlob implements Serializable, Comparable\u003cShortBlob\u003e\n\n`ShortBlob` contains an array of bytes no longer than [DataTypeUtils#MAX_SHORT_BLOB_PROPERTY_LENGTH](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.DataTypeUtils#com_google_appengine_api_datastore_DataTypeUtils_MAX_SHORT_BLOB_PROPERTY_LENGTH). Unlike [Blob](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.Blob), `ShortBlobs` are\nindexed by the datastore and can therefore be filtered and sorted on in queries. If your data is\ntoo large to fit in a `ShortBlob` use [Blob](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.Blob) instead. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e ShortBlob \n\nImplements\n----------\n\n[Serializable](https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html), [Comparable\\\u003cShortBlob\\\u003e](https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable\u003ccom/google/appengine/api/datastore/ShortBlob\u003e.html) \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nStatic Fields\n-------------\n\n### serialVersionUID\n\n public static final long serialVersionUID\n\nConstructors\n------------\n\n### ShortBlob(byte\\[\\] bytes)\n\n public ShortBlob(byte[] bytes)\n\nConstruct a new `ShortBlob` with the specified bytes. This blob cannot be modified after\nconstruction.\n\nMethods\n-------\n\n### compareTo(ShortBlob other)\n\n public int compareTo(ShortBlob other)\n\n### equals(@Nullable Object object)\n\n public boolean equals(@Nullable Object object)\n\nTwo `ShortBlob` objects are considered equal if their contained bytes match exactly.\n\n**Overrides** \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-)\n\n### getBytes()\n\n public byte[] getBytes()\n\nReturn the bytes stored in this `ShortBlob`.\n\n### hashCode()\n\n public int hashCode()\n\n**Overrides** \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--)\n\n### toString()\n\n public String toString()\n\nSimply prints the number of bytes contained in this `ShortBlob`.\n\n**Overrides** \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--)"]]