log = LogFactory.getLog(getClass());
trace = log.isTraceEnabled();
}
public byte[] objectToByteBuffer(Object obj) throws IOException {
ByteBuffer b = objectToBuffer(obj);
byte[] bytes = new byte[b.getLength()];
System.arraycopy(b.getBuf(), b.getOffset(), bytes, 0, b.getLength());
return bytes;
}