The documentation for that function states:
Writes two bytes containing the given char value, in the current byte order, into this buffer at the given index.
It sounds like you have a big-endian byte-order, hence the value you expected to see is being written into the second position (probably with a 0-byte in the first position).
You should use the equivalent put
method instead, which writes a single byte.