}
private void check(ByteBuffer buf)
{
assert (size == buf.remaining());
MsgIterator mi = new MsgIterator(buf.duplicate());
int msgCount = 0;
while (mi.hasNext()) {
msgCount++;
mi.next();
}
assert (count == msgCount);
total.getAndAdd(count);
System.out.println(total);