SerializationUtil

public class SerializationUtil
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.SerializationUtil


Utility to serialize/deserialize an object that implements ERROR(/Serializable).

Summary

Public constructors

SerializationUtil()

Public methods

static Object deserialize(File serializedFile, boolean deleteFile)

Deserialize an object that was serialized using serialize(Serializable).

static File serialize(Serializable o)

Serialize a object that implements ERROR(/Serializable).

Public constructors

SerializationUtil

public SerializationUtil ()

Public methods

deserialize

public static Object deserialize (File serializedFile, 
                boolean deleteFile)

Deserialize an object that was serialized using serialize(Serializable).

Parameters
serializedFile File: the file where the object was serialized.

deleteFile boolean: true if the serialized file should be deleted once deserialized.

Returns
Object the Object deserialized.

Throws
if the deserialization fails.

serialize

public static File serialize (Serializable o)

Serialize a object that implements ERROR(/Serializable).

Parameters
o Serializable: the object to serialize.

Returns
File the ERROR(/File) where the object was serialized.

Throws
if serialization fails.