In the code section, there are these lines:
Code:
final int PRIMESREQUIRED = 10;
final int LONG_BYTES = 8; // Number of bytes for type long
ByteBuffer buf = ByteBuffer.allocate(LONG_BYTES*PRIMESREQUIRED);
indicating a buffer size for
buf of 80. In the text on page 437 it says "Because
buf has a capacity of 8 bytes, only one prime is read each time."
So I recompiled it with
Code:
ByteBuffer buf = ByteBuffer.allocate(LONG_BYTES);
and it seems to work fine. Am I just getting lucky or am I right that there is a minor inconsistency in the definition of
buf?