public abstract class AbstractTransCoder extends Object implements TransCoder
AbstractTransCoder
is nearly the same as the interface
TransCoder
, the only difference is that you needn't return the
written size for memcached set operation.TransCoder
,
ObjectTransCoder
Constructor and Description |
---|
AbstractTransCoder() |
Modifier and Type | Method and Description |
---|---|
abstract void |
encode(OutputStream out,
Object object)
encode the java object into outputstream.
|
int |
encode(SockOutputStream out,
Object object)
encode the java object into outputstream.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decode
public int encode(SockOutputStream out, Object object) throws IOException
TransCoder
encode
in interface TransCoder
out
- outputstream, you can in get written length of bytes in
SockOutputStream
.object
- object to be encoded.IOException
- error happened in encoding the output stream.public abstract void encode(OutputStream out, Object object) throws IOException
out
- outputstream to hold the data.object
- object to be encoded.IOException
Copyright © 2012 Schooner Information Technology. All Rights Reserved.