net.spy.memcached.transcoders
Class IntegerTranscoder

java.lang.Object
  extended by net.spy.SpyObject
      extended by net.spy.memcached.transcoders.IntegerTranscoder
All Implemented Interfaces:
Transcoder<java.lang.Integer>

public final class IntegerTranscoder
extends net.spy.SpyObject
implements Transcoder<java.lang.Integer>

Transcoder that serializes and unserializes longs.


Constructor Summary
IntegerTranscoder()
           
 
Method Summary
 java.lang.Integer decode(CachedData d)
          Decode the cached object into the object it represents.
 CachedData encode(java.lang.Integer l)
          Encode the given object for storage.
 
Methods inherited from class net.spy.SpyObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerTranscoder

public IntegerTranscoder()
Method Detail

encode

public CachedData encode(java.lang.Integer l)
Description copied from interface: Transcoder
Encode the given object for storage.

Specified by:
encode in interface Transcoder<java.lang.Integer>
Parameters:
l - the object
Returns:
the CachedData representing what should be sent

decode

public java.lang.Integer decode(CachedData d)
Description copied from interface: Transcoder
Decode the cached object into the object it represents.

Specified by:
decode in interface Transcoder<java.lang.Integer>
Parameters:
d - the data
Returns:
the return value