code: public static byte[] readBytes(ByteBuffer buffer, int offset, int size) {
          final byte[] dest = new byte[size];
          buffer.get(dest, offset, size);
          return dest;
      }
docs: Read a byte array from the given offset and size in the buffer
  
  This will <em>consume</em> the given {@link ByteBuffer}.