setLocale()

Sets the locale of the data handler.

Syntax

public final void setLocale(Locale localeObject);
 

Parameters

localeObject
A Java Locale object containing the new locale to assign to the data handler's environment.

Return values

None.

Notes

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

This method is useful when the data handler needs to change the data handler's locale. A possible use is to specify a different locale for the serialized data to be converted to a business object. Calling setLocale() before a call to getBO() changes the locale that getBO() uses when it associated a locale with the business object it creates.

See also

getLocale()

Copyright IBM Corp. 1997, 2003