org.apache.turbine.util
Class ObjectUtils

java.lang.Object
  extended by org.apache.turbine.util.ObjectUtils

public abstract class ObjectUtils
extends Object

This is where common Object manipulation routines should go.

Version:
$Id: ObjectUtils.java 1073174 2011-02-21 22:18:45Z tv $
Author:
Nissim Karpenstein, Henning P. Schmiedehausen

Constructor Summary
ObjectUtils()
           
 
Method Summary
static Object deserialize(byte[] objectData)
          Deserializes a single object from an array of bytes.
static byte[] serializeHashtable(Hashtable<String,Object> hash)
          Converts a hashtable to a byte array for storage/serialization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectUtils

public ObjectUtils()
Method Detail

serializeHashtable

public static byte[] serializeHashtable(Hashtable<String,Object> hash)
                                 throws Exception
Converts a hashtable to a byte array for storage/serialization.

Parameters:
hash - The Hashtable to convert.
Returns:
A byte[] with the converted Hashtable.
Throws:
Exception - A generic exception.

deserialize

public static Object deserialize(byte[] objectData)
Deserializes a single object from an array of bytes.

Parameters:
objectData - The serialized object.
Returns:
The deserialized object, or null on failure.


Copyright © 2000-2011 The Apache Software Foundation. All Rights Reserved.