Package org.apache.turbine.util
Class LocaleUtils
- java.lang.Object
-
- org.apache.turbine.util.LocaleUtils
-
public class LocaleUtils extends Object
This class provides utilities for handling locales and charsets- Author:
- Thomas Vandahl
-
-
Constructor Summary
Constructors Constructor Description LocaleUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Charset
getDefaultCharset()
Gets the default charset defined by a property named "locale.default.charset"static String
getDefaultCharSet()
Deprecated.static String
getDefaultInputEncoding()
Returns the default input encoding for the servlet.static Locale
getDefaultLocale()
Gets the default locale defined by properties named "locale.default.lang" and "locale.default.country".static Charset
getOverrideCharset()
Gets the charset defined by a property named "locale.override.charset" This property has no default.static String
getOverrideCharSet()
Deprecated.
-
-
-
Constructor Detail
-
LocaleUtils
public LocaleUtils()
-
-
Method Detail
-
getDefaultInputEncoding
public static String getDefaultInputEncoding()
Returns the default input encoding for the servlet.- Returns:
- the default input encoding.
-
getDefaultLocale
public static Locale getDefaultLocale()
Gets the default locale defined by properties named "locale.default.lang" and "locale.default.country". This changed from earlier Turbine versions that you can rely on getDefaultLocale() to never return null.- Returns:
- A Locale object.
-
getDefaultCharSet
@Deprecated public static String getDefaultCharSet()
Deprecated.Gets the default charset defined by a property named "locale.default.charset"- Returns:
- the name of the default charset or null.
-
getDefaultCharset
public static Charset getDefaultCharset()
Gets the default charset defined by a property named "locale.default.charset"- Returns:
- the default charset, never null.
-
getOverrideCharSet
@Deprecated public static String getOverrideCharSet()
Deprecated.Gets the charset defined by a property named "locale.override.charset" This property has no default. If it exists, the output charset is always set to its value- Returns:
- the name of the override charset or null.
-
getOverrideCharset
public static Charset getOverrideCharset()
Gets the charset defined by a property named "locale.override.charset" This property has no default. If it exists, the output charset is always set to its value- Returns:
- the override charset or null.
-
-