public class

Encoding

extends Object
java.lang.Object
   ↳ webwork.util.Encoding

Class Overview

This class acts as a cache around webwork's encoding property

Summary

Public Constructors
Encoding()
Public Methods
static String getEncoding()
Get the encoding specified by the property 'webwork.i18n.encoding' in webwork.properties, or return the default platform encoding if not specified.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Encoding ()

Public Methods

public static String getEncoding ()

Get the encoding specified by the property 'webwork.i18n.encoding' in webwork.properties, or return the default platform encoding if not specified.

Note that if the property is not initially defined, this will return the system default, even if the property is later defined. This is mainly for performance reasons. Undefined properties throw exceptions, which are a costly operation.

If the property is initially defined, it is read every time, until is is undefined, and then the system default is used.

Why not cache it completely? Some applications will wish to be able to dynamically set the encoding at runtime.
Returns
  • The encoding to be used.