public void setEncoding (String encoding)

Set the character encoding, if known.

The encoding must be a string acceptable for an XML encoding declaration (see section 4.3.3 of the XML 1.0 recommendation).

This method has no effect when the application provides a character stream.

Parameters:
encoding    A string describing the character encoding.

See also:
setSystemId, setByteStream, getEncoding