Fixed java writeString for BinaryWriter when hitting 2 byte utf8
characters