code: protected void update(ByteBuffer b) {
      if (b.hasArray()) {
        update(b.array(), b.arrayOffset() + b.position(), b.remaining());
        b.position(b.limit());
      } else {
        for (int remaining = b.remaining(); remaining > 0; remaining--) {
          update(b.get());
        }
      }
    }
docs: Updates this hasher with bytes from the given buffer.