String's indexOf is overridden to take a char. So if you're providing a byte, the byte is converted to char. Interestingly, this is done by first widening to type int and then narrowing to type char. (See JLS 5.1.4.)
So s.indexOf((byte)218) is looking for the char represented by 65498, but I assume you want it to look for a String representation of the byte value -38. That is, s.indexOf(Byte.toString((byte)218)).
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org