public class SerializationUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SerializationUtil.CompressionType
Type of compression to optionally use when serializing/deserializing objects.
|
Modifier and Type | Method and Description |
---|---|
static <T extends Serializable> |
clone(T toClone) |
static Serializable |
deserializeFromByteArray(byte[] bytes) |
static <T> T |
deserializeFromByteArray(byte[] bytes,
boolean ignoreHeader) |
static <T> T |
deserializeFromByteBuffer(ByteBuffer bytes,
boolean ignoreHeader) |
static <T extends Serializable> |
deserializeFromDatastoreProperty(com.google.appengine.api.datastore.Entity entity,
String property) |
static <T extends Serializable> |
deserializeFromDatastoreProperty(com.google.appengine.api.datastore.Entity entity,
String property,
boolean lenient) |
static byte[] |
getBytes(ByteBuffer in) |
static Iterable<com.google.appengine.api.datastore.Key> |
getShardedValueKeysFor(com.google.appengine.api.datastore.Transaction tx,
com.google.appengine.api.datastore.Key parent,
String property) |
static <T> T |
readObjectFromObjectStreamUsingMarshaller(Marshaller<T> marshaller,
ObjectInputStream oin) |
static byte[] |
serializeToByteArray(Serializable o) |
static byte[] |
serializeToByteArray(Serializable o,
boolean ignoreHeader) |
static byte[] |
serializeToByteArray(Serializable o,
boolean ignoreHeader,
SerializationUtil.CompressionType compression) |
static void |
serializeToDatastoreProperty(com.google.appengine.api.datastore.Transaction tx,
com.google.appengine.api.datastore.Entity entity,
String property,
Serializable o) |
static void |
serializeToDatastoreProperty(com.google.appengine.api.datastore.Transaction tx,
com.google.appengine.api.datastore.Entity entity,
String property,
Serializable o,
SerializationUtil.CompressionType compression) |
static <T> void |
writeObjectToOutputStreamUsingMarshaller(T object,
Marshaller<T> marshaller,
ObjectOutputStream oout) |
public static Serializable deserializeFromByteArray(byte[] bytes)
public static <T> T deserializeFromByteBuffer(ByteBuffer bytes, boolean ignoreHeader)
public static <T> T deserializeFromByteArray(byte[] bytes, boolean ignoreHeader)
public static <T extends Serializable> T deserializeFromDatastoreProperty(com.google.appengine.api.datastore.Entity entity, String property)
public static <T extends Serializable> T deserializeFromDatastoreProperty(com.google.appengine.api.datastore.Entity entity, String property, boolean lenient)
public static void serializeToDatastoreProperty(com.google.appengine.api.datastore.Transaction tx, com.google.appengine.api.datastore.Entity entity, String property, Serializable o)
public static Iterable<com.google.appengine.api.datastore.Key> getShardedValueKeysFor(com.google.appengine.api.datastore.Transaction tx, com.google.appengine.api.datastore.Key parent, String property)
public static void serializeToDatastoreProperty(com.google.appengine.api.datastore.Transaction tx, com.google.appengine.api.datastore.Entity entity, String property, Serializable o, SerializationUtil.CompressionType compression)
public static byte[] serializeToByteArray(Serializable o)
public static byte[] serializeToByteArray(Serializable o, boolean ignoreHeader)
public static byte[] serializeToByteArray(Serializable o, boolean ignoreHeader, SerializationUtil.CompressionType compression)
public static byte[] getBytes(ByteBuffer in)
public static <T> void writeObjectToOutputStreamUsingMarshaller(T object, Marshaller<T> marshaller, ObjectOutputStream oout) throws IOException
IOException
public static <T> T readObjectFromObjectStreamUsingMarshaller(Marshaller<T> marshaller, ObjectInputStream oin) throws IOException
IOException
public static <T extends Serializable> T clone(T toClone)
Copyright © 2015 Google. All rights reserved.