Package org.apache.turbine.util
Class ObjectUtils
- java.lang.Object
-
- org.apache.turbine.util.ObjectUtils
-
public abstract class ObjectUtils extends Object
This is where common Object manipulation routines should go.- Version:
- $Id$
- Author:
- Nissim Karpenstein, Henning P. Schmiedehausen
-
-
Constructor Summary
Constructors Constructor Description ObjectUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
deserialize(byte[] objectData)
Deserializes a single object from an array of bytes.static byte[]
serializeMap(Map<String,Object> map)
Converts a map to a byte array for storage/serialization.
-
-
-
Constructor Detail
-
ObjectUtils
public ObjectUtils()
-
-
Method Detail
-
serializeMap
public static byte[] serializeMap(Map<String,Object> map) throws Exception
Converts a map to a byte array for storage/serialization.- Parameters:
map
- The Map to convert.- Returns:
- A byte[] with the converted Map.
- Throws:
Exception
- A generic exception.
-
deserialize
public static <T> T deserialize(byte[] objectData)
Deserializes a single object from an array of bytes.- Type Parameters:
T
- type of the object to return- Parameters:
objectData
- The serialized object.- Returns:
- The deserialized object, or
null
on failure.
-
-