Encodes a String using UTF-16 and copies it into a ByteArray at a given offset.
The encoded ByteArray
the ByteArray to copy the encoded data into.
the offset at which to copy the encoded data.
the ByteOrder to use.