Home » apache-harmony-6.0-src-r917296-snapshot » org.apache.harmony.awt.internal.nls » [javadoc | source]
org.apache.harmony.awt.internal.nls
public class: Messages [javadoc | source]
java.lang.Object
   org.apache.harmony.awt.internal.nls.Messages
This class retrieves strings from a resource bundle and returns them, formatting them with MessageFormat when required.

It is used by the system classes to provide national language support, by looking up messages in the org.apache.harmony.awt.internal.nls.messages resource bundle. Note that if this file is not available, or an invalid key is looked up, or resource bundle support is not available, the key itself will be returned as the associated message. This means that the KEY should a reasonable human-readable (english) string.
Method from org.apache.harmony.awt.internal.nls.Messages Summary:
format,   getString,   getString,   getString,   getString,   getString,   getString,   setLocale
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.harmony.awt.internal.nls.Messages Detail:
 public static String format(String format,
    Object[] args) 
    Generates a formatted text string given a source string containing "argument markers" of the form "{argNum}" where each argNum must be in the range 0..9. The result is generated by inserting the toString of each argument into the position indicated in the string.

    To insert the "{" character into the output, use a single backslash character to escape it (i.e. "\{"). The "}" character does not need to be escaped.

 public static String getString(String msg) 
    Retrieves a message which has no arguments.
 public static String getString(String msg,
    Object arg) 
    Retrieves a message which takes 1 argument.
 public static String getString(String msg,
    int arg) 
    Retrieves a message which takes 1 integer argument.
 public static String getString(String msg,
    char arg) 
    Retrieves a message which takes 1 character argument.
 public static String getString(String msg,
    Object[] args) 
    Retrieves a message which takes several arguments.
 public static String getString(String msg,
    Object arg1,
    Object arg2) 
    Retrieves a message which takes 2 arguments.
 public static ResourceBundle setLocale(Locale locale,
    String resource) 
    Changes the locale of the messages.