public final class ErrorPkg
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getMessage(java.lang.String name)
Get the message for a given message identifier/name.
|
static java.lang.String |
getMessage(java.lang.String name,
java.lang.String[] args,
int[] vals)
Returns the message.
|
static java.lang.String |
getMessage(java.lang.String name,
java.lang.String[] args,
java.lang.String[] vals)
Get the message for a given message identifier/name, replacing each
token specified in
args with the corresponding value
specified in vals . |
static java.lang.String |
getMessage(java.lang.String name,
java.lang.String arg,
java.util.Date date) |
static java.lang.String |
getMessage(java.lang.String name,
java.lang.String arg,
java.lang.String val)
Get the message for a given message identifier/name, replacing the
specified token identified by
arg with the value specified
by val . |
static java.lang.String |
getMessage(java.lang.String name,
java.lang.String arg,
java.security.cert.X509Certificate certificate) |
static void |
init()
Initialise the ErrorPkg class from a messages file.
|
public static void init() throws java.io.IOException, java.io.FileNotFoundException
java.io.IOException
- The messages couldn't be loaded from a message file
into the internal Properties object.java.io.FileNotFoundException
- The messages file couldn't be found.public static java.lang.String getMessage(java.lang.String name)
name
- The identifier of a message, as specified as a key in the
messages file.name
parameter.public static java.lang.String getMessage(java.lang.String name, java.lang.String arg, java.lang.String val)
arg
with the value specified
by val
.name
- The identifier of a message, as specified as a key in the
messages file.arg
- The token identifier to replace.val
- The value to replace the token identifier with.name
parameter, with the token name
replaced by the given value.public static java.lang.String getMessage(java.lang.String name, java.lang.String[] args, java.lang.String[] vals)
args
with the corresponding value
specified in vals
.name
- The identifier of a message, as specified as a key in the
messages file.args
- The array of token identifiers to replace.vals
- The array of values to replace the token identifiers with.name
parameter, with the token
identifiers replaced by the given value.public static java.lang.String getMessage(java.lang.String name, java.lang.String[] args, int[] vals)
name
- The identifier of a message, as specified as a key in the
messages file.args
- The array of token identifiers to replace.vals
- The array of values to replace the token identifiers with.name
parameter, with the token
identifiers replaced by the given value.public static java.lang.String getMessage(java.lang.String name, java.lang.String arg, java.util.Date date)
public static java.lang.String getMessage(java.lang.String name, java.lang.String arg, java.security.cert.X509Certificate certificate)