void _reset(Buffer b) {
   b.position(0);
   b.limit(b.capacity());
 }