code: @Override
      public PollResult poll(T target) {
          int index = buffer.position();
  
          byte status = readStatus();
          if (status == STATUS_EMPTY) {
              buffer.position(index);
              return PollResult.NO_NEW_MESSAGES;
          }
          if (status == STATUS_END_OF_STREAM) {
              return PollResult.END_OF_STREAM;
          }
          memoryBarrier.loadLoad();
  
          if (index == 0) {
              // For the header, the first byte works both as the status (when zero),
              // and part of the magic bytes (when non-zero), so we must not consume the byte before readHeader().
              buffer.position(index);
              readHeader();
  
          } else {
              assert status == STATUS_EXISTS : "unexpected status: " + status;
              messageEncoding.decode(target);
          }
          return PollResult.HAD_SOME_MESSAGES;
      }
docs: read operations