code: public static int requireUnsignedByte(int i) {
      if (i > UNSIGNED_BYTE_MAX_VALUE) {
        throw new IllegalArgumentException(
            String.format("%d is larger than %d bits", i, UNSIGNED_BYTE_SIZE));
      }
  
      return i;
    }
docs: Requires that an {@code int} can be represented as an unsigned {@code byte}.
  
  @param i the {@code int} to test
  @return the {@code int} if it can be represented as an unsigned {@code byte}
  @throws IllegalArgumentException if {@code i} cannot be represented as an unsigned {@code byte}