original object back. You could implement something like this:
>
> public StringTranscoder implements Transcoder {
> public CachedData encode(Object o) {
> // Will throw a ClassCastException if it's not a string.
> String s=(String)o;
> return new CachedData(0, s.getBytes("UTF-8"));
> }
>
> public Object decode(CachedData d) {
> return new String(d.getData(), "UTF-8");
> }
> }
>
> (note that there's an UnsupportedEncodingException that needs to be
> caught and rethrown in there, but that's the basic idea).
>
>
> Then you just do this:
>
> client.setTranscoder(new StringTranscoder());
>
>
>
> -- again, though, this solves your exact problem, but not the
> general
> problem of getting clients to agree on storage formats. That comes up
> quite often.
That is perfect, exactly what I wanted, thank you! Just out of interest,
with the binary protocol has this 'issue' been sorted out or is it still a
free for all client-wise ? (are you aware?)
- Ciaran