Sometimes it is desirable to read all segments from a single ByteBuffer, e.g. if reading messages from a memory-mapped file. Here we add such support, and add a test to check that the ByteBuffer read behaves the same as the ReadableByteChannel read.