com.google.appengine.api.blobstore

## Class BlobInfoFactory

- java.lang.Object
- - com.google.appengine.api.blobstore.BlobInfoFactory

-     public class BlobInfoFactory
      extends java.lang.Object

  `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.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `CONTENT_TYPE`
    `static java.lang.String` | `CREATION`
    `static java.lang.String` | `FILENAME`
    `static java.lang.String` | `GS_OBJECT_NAME`
    `static java.lang.String` | `KIND`
    `static java.lang.String` | `MD5_HASH`
    `static java.lang.String` | `SIZE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BlobInfoFactory()` Creates a `BlobInfoFactory` that uses the default implementation of `DatastoreService`.
    `BlobInfoFactory(DatastoreService datastoreService)` Creates a `BlobInfoFactory` with the specified implementation of `DatastoreService`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `BlobInfo` | `createBlobInfo(Entity entity)` Creates a `BlobInfo` by extracting content from the specified `Entity`.
    `BlobInfo` | `loadBlobInfo(BlobKey blobKey)` Loads the `BlobInfo` metadata for `blobKey`.
    `java.util.Iterator<BlobInfo>` | `queryBlobInfos()` Queries for `BlobInfo` instances, beginning with the `BlobKey` that appears first in lexicographic order.
    `java.util.Iterator<BlobInfo>` | `queryBlobInfosAfter(BlobKey previousBlob)` Queries for `BlobInfo` instances, beginning at the blob following `previousBlob` in lexicographic order.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### KIND

          public static final java.lang.String KIND

      See Also:
        Constant Field Values

    - #### CONTENT_TYPE

          public static final java.lang.String CONTENT_TYPE

      See Also:
        Constant Field Values

    - #### CREATION

          public static final java.lang.String CREATION

      See Also:
        Constant Field Values

    - #### FILENAME

          public static final java.lang.String FILENAME

      See Also:
        Constant Field Values

    - #### SIZE

          public static final java.lang.String SIZE

      See Also:
        Constant Field Values

    - #### MD5_HASH

          public static final java.lang.String MD5_HASH

      See Also:
        Constant Field Values

    - #### GS_OBJECT_NAME

          public static final java.lang.String GS_OBJECT_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### BlobInfoFactory

          public BlobInfoFactory()

      Creates a `BlobInfoFactory` that uses the default implementation of `DatastoreService`.

    - #### BlobInfoFactory

          public BlobInfoFactory(DatastoreService datastoreService)

      Creates a `BlobInfoFactory` with the specified implementation of `DatastoreService`.

  - ### Method Detail

    - #### loadBlobInfo

          public BlobInfo loadBlobInfo(BlobKey blobKey)

      Loads the `BlobInfo` metadata for `blobKey`. Returns `null` if no matching blob is found.

    - #### queryBlobInfos

          public java.util.Iterator<BlobInfo> queryBlobInfos()

      Queries for `BlobInfo` instances, beginning with the `BlobKey` that appears first in lexicographic order.

    - #### queryBlobInfosAfter

          public java.util.Iterator<BlobInfo> queryBlobInfosAfter(BlobKey previousBlob)

      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.

    - #### createBlobInfo

          public BlobInfo createBlobInfo(Entity entity)

      Creates a `BlobInfo` by extracting content from the specified `Entity`.