I'm trying to write in kotlin this java statement:

```
sb.append(Integer.toHexString((array[i] & 0xFF) | 0x100).substring(1, 3));

```

I have tried the following:

```
sb.append(Integer.toHexString(((array[i] and 0xFF.toByte()) or 0x100.toByte()).toInt()).substring(1, 3))

```

The kotlin "and" and "or" are from importing:

```
import kotlin.experimental.and
import kotlin.experimental.or 

```

I believe the problem is in the .toByte() function which is not needed in Java, but Kotlin obliges to it to compile.

What could I do so an equivalent code to the one in Java is written in Kotlin?