Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.appengine.api.datastore
Class ShortBlob

    java.lang.Object
      com.google.appengine.api.datastore.ShortBlob

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<ShortBlob>

    public final class ShortBlob

extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<ShortBlob>

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

See Also:
  Serialized Form

Field Summary
`static long` | `serialVersionUID`

Constructor Summary
`ShortBlob(byte[] bytes)` Construct a new `ShortBlob` with the specified bytes.

Method Summary
`int` | `compareTo(ShortBlob other)`
`boolean` | `equals(java.lang.Object object)` Two `ShortBlob` objects are considered equal if their contained bytes match exactly.
`byte[]` | `getBytes()` Return the bytes stored in this `ShortBlob`.
`int` | `hashCode()`
`java.lang.String` | `toString()` Simply prints the number of bytes contained in this `ShortBlob`.

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### serialVersionUID

    public static final long serialVersionUID

See Also:
  Constant Field Values

Constructor Detail

### ShortBlob

    public ShortBlob(byte[] bytes)

  Construct a new `ShortBlob` with the specified bytes. This blob cannot be modified after construction.

Method Detail

### getBytes

    public byte[] getBytes()

  Return the bytes stored in this `ShortBlob`.

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object object)

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

  Overrides:
    `equals` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  Simply prints the number of bytes contained in this `ShortBlob`.

  Overrides:
    `toString` in class `java.lang.Object`

### compareTo

    public int compareTo(ShortBlob other)

  Specified by:
    `compareTo` in interface `java.lang.Comparable<ShortBlob>`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD