public int read(ByteBuffer b) {
   return BufferUtils.transfer(buffer, b);
 }