public Long decode(CachedData d) {
    if (FLAGS == d.getFlags()) {
      return tu.decodeLong(d.getData());
    } else {
      getLogger().error(
          "Unexpected flags for long:  " + d.getFlags() + " wanted " + FLAGS);
      return null;
    }
  }
Transcoder that serializes and unserializes longs.
src/main/java/net/spy/memcached/transcoders/LongTranscoder.java