This method of the XMLOutputStream class defines the character encoding of the output stream.
public void setEncoding(String encoding, boolean littleendian, boolean byteOrderMark) throws IOException;
encoding | The type of character encoding. This can be one of the following formats:
The default character encoding is ASCII. |
littleendian | Set this parameter to true to specify whether the stream is in little endian format. |
byteOrderMark | This flag is only relevant if the character encoding type is UCS-2. Otherwise, it is ignored. |
IOException if the encoding type is not supported by the currently installed virtual machine.