default ByteBuffer serialize(T value){
  ByteBuffer buffer=ByteBuffer.allocate(size(value));
  serialize(value,buffer);
  return buffer;
}

default ByteBuffer serialize ( T value ) { ByteBuffer buffer = ByteBuffer . allocate ( size ( value ) ) ; serialize ( value , buffer ) ; return buffer ; }
serialize to a byte buffer
