pl.edu.agh.cast.common
Class SerializationUtil
java.lang.Object
pl.edu.agh.cast.common.SerializationUtil
public class SerializationUtil
- extends Object
Utility class which provides methods for serialization object.
- Author:
- AGH CAST Team
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SerializationUtil
public SerializationUtil()
objectToString
public static String objectToString(Object obj)
throws IOException
- Serializes the given object to string using
BASE64Encoder
class.
- Parameters:
obj
- object to serialize
- Returns:
- serialized object in string format
- Throws:
IOException
- if any I/O error occurs during serialization
stringToObject
public static Object stringToObject(String str)
throws IOException,
ClassNotFoundException
- Deserailizes given string to object using
BASE64Decoder
class.
- Parameters:
str
- string which contains serialized object
- Returns:
- deserialized object
- Throws:
IOException
- when any I/O error occurs during deserailization
ClassNotFoundException
- when cannot find class of deserailized object
Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.