Here is some code to serialize an object to a byte[] and deserialize it back to an object using GemFire APIs:
import com.gemstone.gemfire.internal.util.BlobHelper;// Serialize to byte arraybyte[] serializedValue = null;try{ serializedValue = BlobHelper.serializeToBlob(obj);}catch (IOException e) { // fail test}// Deserialize from byte array
Object value = null;try{ value = BlobHelper.deserializeBlob(serializedValue);}catch (Exception e) { // fail test}