Change `#writeBytes` for `String` to use `#getBytes` from String.

This may potentially even yield a better performance, especially on direct buffers, since memory region will
be copied. On an on-heap buffers this will be slightly faster, since `arraycpy` is used to copy the array.