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 thanDataTypeUtils.MAX_SHORT_BLOB_PROPERTY_LENGTH
. UnlikeBlob
,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 aShortBlob
useBlob
instead.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static long
serialVersionUID
-
Constructor Summary
Constructors Constructor and Description ShortBlob(byte[] bytes)
Construct a newShortBlob
with the specified bytes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
compareTo(ShortBlob other)
boolean
equals(java.lang.Object object)
TwoShortBlob
objects are considered equal if their contained bytes match exactly.byte[]
getBytes()
Return the bytes stored in thisShortBlob
.int
hashCode()
java.lang.String
toString()
Simply prints the number of bytes contained in thisShortBlob
.
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ShortBlob
public ShortBlob(byte[] bytes)
Construct a newShortBlob
with the specified bytes. This blob cannot be modified after construction.
-
-
Method Detail
-
getBytes
public byte[] getBytes()
Return the bytes stored in thisShortBlob
.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object object)
TwoShortBlob
objects are considered equal if their contained bytes match exactly.- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
Simply prints the number of bytes contained in thisShortBlob
.- Overrides:
toString
in classjava.lang.Object
-
-