It is used by the system classes to provide national language support, by looking up messages in the
org.apache.commons.compress.harmony.archive.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.
| Modifier and Type | Field and Description |
|---|---|
| private static ResourceBundle |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static String | Returns: String the formatted message.String the format to use when printing. format, final Object[] Object[] the arguments to use. 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. |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static String | Returns: String the message for that key in the system message bundle.String the key to look up. msg, final Object Object an object to insert in the formatted output. arg1, final Object Object another object to insert in the formatted output. arg2)Retrieves a message which takes 2 arguments. |
| public static String | |
| public static ResourceBundle |
| bundle | back to summary |
|---|---|
| private static ResourceBundle bundle | |
| Messages | back to summary |
|---|---|
| public Messages() | |
| format | back to summary |
|---|---|
| public static String format(final String format, final 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. | |
| getString | back to summary |
|---|---|
| public static String getString(final String msg) Retrieves a message which has no arguments. | |
| getString | back to summary |
|---|---|
| public static String getString(final String msg, final char arg) Retrieves a message which takes 1 character argument. | |
| getString | back to summary |
|---|---|
| public static String getString(final String msg, final int arg) Retrieves a message which takes 1 integer argument. | |
| getString | back to summary |
|---|---|
| public static String getString(final String msg, final Object arg) Retrieves a message which takes 1 argument. | |
| getString | back to summary |
|---|---|
| public static String getString(final String msg, final Object arg1, final Object arg2) Retrieves a message which takes 2 arguments. | |
| getString | back to summary |
|---|---|
| public static String getString(final String msg, final Object[] args) Retrieves a message which takes several arguments. | |
| setLocale | back to summary |
|---|---|
| public static ResourceBundle setLocale(final Locale locale, final String resource) Changes the locale of the messages.
| |