org.apache.jcs.utils.serialization
Class SerializationConversionUtil

java.lang.Object
  extended by org.apache.jcs.utils.serialization.SerializationConversionUtil

public class SerializationConversionUtil
extends java.lang.Object

This uses a supplied Serializer to convert to and from cache elements.

Author:
Aaron Smuts

Constructor Summary
SerializationConversionUtil()
           
 
Method Summary
static ICacheElement getDeSerializedCacheElement(ICacheElementSerialized serialized, IElementSerializer elementSerializer)
          This returns a wrapper that has a de-serialized version of the value instead of the serialized value.
static ICacheElementSerialized getSerializedCacheElement(ICacheElement element, IElementSerializer elementSerializer)
          This returns a wrapper that has a serialized version of the value instead of the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializationConversionUtil

public SerializationConversionUtil()
Method Detail

getSerializedCacheElement

public static ICacheElementSerialized getSerializedCacheElement(ICacheElement element,
                                                                IElementSerializer elementSerializer)
                                                         throws java.io.IOException
This returns a wrapper that has a serialized version of the value instead of the value.

Parameters:
element -
elementSerializer - the serializer to be used.
Returns:
null for null;
Throws:
java.io.IOException

getDeSerializedCacheElement

public static ICacheElement getDeSerializedCacheElement(ICacheElementSerialized serialized,
                                                        IElementSerializer elementSerializer)
                                                 throws java.io.IOException,
                                                        java.lang.ClassNotFoundException
This returns a wrapper that has a de-serialized version of the value instead of the serialized value.

Parameters:
serialized -
elementSerializer - the serializer to be used.
Returns:
null for null;
Throws:
java.io.IOException
java.lang.ClassNotFoundException


Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.