99100101102103104105106107108109
public byte[] write(Object object) { final Output out = getOutput(); out.clear(); kryo.writeClassAndObject(out, object); out.flush(); return out.toBytes(); } @Override public Object read(byte[] buf) { return read(buf, 0);