private long readGenericLongScalar() {
    long res = 0;
    int shift = 0;
    for (int i = 0; i < currentPayloadSize; i++) {
      res |= ((long) payloadByte(currentPayloadSize - i - 1) & 0xFF) << shift;
      shift += 8;
    }
    return res;
  }
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