setEncoding()

Sets the character encoding that the data handler is using.

Syntax

public final void setEncoding(String encodingName);
 

Parameters

encodingName
A String object containing the new value to assign as the data handler's character encoding.

Return values

None.

Notes

The setEncoding() method sets the data handler's character encoding. The character encoding is part of the locale, which defines cultural conventions for data according to language, country (or territory). This method is the accessor method that sets a private character-encoding variable in the DataHandler class. This character encoding should indicate the character encoding of the serialized data that the data handler is processing.

This method is useful when the data handler needs to perform character-encoding processing, such as character conversion.

See also

getEncoding()

Copyright IBM Corp. 1997, 2003