Stay organized with collections
Save and categorize content based on your preferences.
publicclassBlobInfoFactory
BlobInfoFactory provides a trivial interface for retrieving
BlobInfo metadata.
BlobInfo metadata is stored in read-only BlobInfo
entities in the datastore. This class provides an easy way to
access these entities. For more complex queries, you can use the
datastore directly.
Queries for BlobInfo instances, beginning at the blob
following previousBlob in lexicographic order. If
previousBlob is null, the first blob will be returned.
This is useful for displaying discrete pages of blobs.
[[["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-04 UTC."],[[["\u003cp\u003e\u003ccode\u003eBlobInfoFactory\u003c/code\u003e provides a simple way to retrieve \u003ccode\u003eBlobInfo\u003c/code\u003e metadata, which is stored in read-only \u003ccode\u003eBlobInfo\u003c/code\u003e entities within the datastore.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers methods to create a \u003ccode\u003eBlobInfo\u003c/code\u003e instance from an \u003ccode\u003eEntity\u003c/code\u003e, load \u003ccode\u003eBlobInfo\u003c/code\u003e for a specific \u003ccode\u003eBlobKey\u003c/code\u003e, or to retrieve a list of \u003ccode\u003eBlobInfo\u003c/code\u003e entities.\u003c/p\u003e\n"],["\u003cp\u003eYou can construct a \u003ccode\u003eBlobInfoFactory\u003c/code\u003e using either the default \u003ccode\u003eDatastoreService\u003c/code\u003e or by providing a custom implementation of the \u003ccode\u003eDatastoreService\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eBlobInfoFactory\u003c/code\u003e includes static fields such as CONTENT_TYPE, CREATION, FILENAME, GS_OBJECT_NAME, KIND, MD5_HASH, and SIZE for data retrieval.\u003c/p\u003e\n"],["\u003cp\u003eMethods such as \u003ccode\u003equeryBlobInfos()\u003c/code\u003e and \u003ccode\u003equeryBlobInfosAfter(BlobKey previousBlob)\u003c/code\u003e allow you to iterate through \u003ccode\u003eBlobInfo\u003c/code\u003e instances, either from the beginning or from a specified \u003ccode\u003eBlobKey\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Class BlobInfoFactory (2.0.0)\n\n public class BlobInfoFactory\n\n`BlobInfoFactory` provides a trivial interface for retrieving\n[BlobInfo](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.blobstore.BlobInfo) metadata.\n\nBlobInfo metadata is stored in read-only **BlobInfo**\nentities in the datastore. This class provides an easy way to\naccess these entities. For more complex queries, you can use the\ndatastore directly. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e BlobInfoFactory \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### CONTENT_TYPE\n\n public static final String CONTENT_TYPE\n\n### CREATION\n\n public static final String CREATION\n\n### FILENAME\n\n public static final String FILENAME\n\n### GS_OBJECT_NAME\n\n public static final String GS_OBJECT_NAME\n\n### KIND\n\n public static final String KIND\n\n### MD5_HASH\n\n public static final String MD5_HASH\n\n### SIZE\n\n public static final String SIZE\n\nConstructors\n------------\n\n### BlobInfoFactory()\n\n public BlobInfoFactory()\n\nCreates a `BlobInfoFactory` that uses the default\nimplementation of [DatastoreService](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.DatastoreService).\n\n### BlobInfoFactory(DatastoreService datastoreService)\n\n public BlobInfoFactory(DatastoreService datastoreService)\n\nCreates a `BlobInfoFactory` with the specified\nimplementation of [DatastoreService](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.DatastoreService).\n\nMethods\n-------\n\n### createBlobInfo(Entity entity)\n\n public BlobInfo createBlobInfo(Entity entity)\n\nCreates a [BlobInfo](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.blobstore.BlobInfo) by extracting content from the\nspecified [Entity](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.Entity).\n\n### loadBlobInfo(BlobKey blobKey)\n\n public @Nullable BlobInfo loadBlobInfo(BlobKey blobKey)\n\nLoads the [BlobInfo](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.blobstore.BlobInfo) metadata for `blobKey`. Returns\n`null` if no matching blob is found.\n\n### queryBlobInfos()\n\n public Iterator\u003cBlobInfo\u003e queryBlobInfos()\n\nQueries for [BlobInfo](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.blobstore.BlobInfo) instances, beginning with the BlobKey that appears first in lexicographic order.\n\n### queryBlobInfosAfter(@Nullable BlobKey previousBlob)\n\n public Iterator\u003cBlobInfo\u003e queryBlobInfosAfter(@Nullable BlobKey previousBlob)\n\nQueries for [BlobInfo](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.blobstore.BlobInfo) instances, beginning at the blob\nfollowing `previousBlob` in lexicographic order. If `\npreviousBlob` is null, the first blob will be returned.\n\nThis is useful for displaying discrete pages of blobs."]]