private void prepareCurrentItem() {
    // Sets the kind of the item, the offset at which his payload starts and the size of this
    // payload.
    try {
      final RLPDecodingHelpers.RLPElementMetadata elementMetadata =
          RLPDecodingHelpers.rlpElementMetadata(this::inputByte, size, currentItem);
      currentKind = elementMetadata.kind;
      currentPayloadOffset = elementMetadata.payloadStart;
      currentPayloadSize = elementMetadata.payloadSize;
      currentRlpSize = Math.toIntExact(currentPayloadOffset - currentItem) + currentPayloadSize;
    } catch (final RLPException exception) {
      final String message =
          String.format(exception.getMessage() + errorMessageSuffix, getErrorMessageSuffixParams());
      throw new RLPException(message, exception);
    }
  }
Sets the input to the item provided (an offset to the beginning of an item) and check this is
valid.

@param item the value to which the current item is to be set.
ethereum/rlp/src/main/java/org/hyperledger/besu/ethereum/rlp/AbstractRLPInput.java