This method of the Document class retrieves the character set. This is an alias for the setEncoding method and exists for compatibility reasons only.
public final String getCharset();
Returns the character set.