org.bouncycastle.i18n
Class MessageBundle
java.lang.Object
org.bouncycastle.i18n.LocalizedMessage
org.bouncycastle.i18n.TextBundle
org.bouncycastle.i18n.MessageBundle
- Direct Known Subclasses:
- ErrorBundle
public class MessageBundle
- extends TextBundle
Field Summary |
static java.lang.String |
TITLE_ENTRY
title entry key |
Constructor Summary |
MessageBundle(java.lang.String resource,
java.lang.String id)
Constructs a new MessageBundle using resource as the base name for the
RessourceBundle and id as the message bundle id the resource file. |
MessageBundle(java.lang.String resource,
java.lang.String id,
java.lang.Object[] arguments)
Constructs a new MessageBundle using resource as the base name for the
RessourceBundle and id as the message bundle id the resource file. |
MessageBundle(java.lang.String resource,
java.lang.String id,
java.lang.String encoding)
Constructs a new MessageBundle using resource as the base name for the
RessourceBundle and id as the message bundle id the resource file. |
MessageBundle(java.lang.String resource,
java.lang.String id,
java.lang.String encoding,
java.lang.Object[] arguments)
Constructs a new MessageBundle using resource as the base name for the
RessourceBundle and id as the message bundle id the resource file. |
Method Summary |
java.lang.String |
getTitle(java.util.Locale loc)
Returns the title message in the given locale and the default timezone. |
java.lang.String |
getTitle(java.util.Locale loc,
java.util.TimeZone timezone)
Returns the title message in the given locale and timezone. |
Methods inherited from class org.bouncycastle.i18n.LocalizedMessage |
addExtraArgs, formatWithTimeZone, getArguments, getClassLoader, getEntry, getExtraArgs, getFilter, getId, getResource, setClassLoader, setExtraArgument, setExtraArguments, setFilter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TITLE_ENTRY
public static final java.lang.String TITLE_ENTRY
- title entry key
- See Also:
- Constant Field Values
MessageBundle
public MessageBundle(java.lang.String resource,
java.lang.String id)
throws java.lang.NullPointerException
- Constructs a new MessageBundle using
resource
as the base name for the
RessourceBundle and id
as the message bundle id the resource file.
- Parameters:
resource
- base name of the resource fileid
- the id of the corresponding bundle in the resource file
- Throws:
java.lang.NullPointerException
- if resource
or id
is null
MessageBundle
public MessageBundle(java.lang.String resource,
java.lang.String id,
java.lang.String encoding)
throws java.lang.NullPointerException,
java.io.UnsupportedEncodingException
- Constructs a new MessageBundle using
resource
as the base name for the
RessourceBundle and id
as the message bundle id the resource file.
- Parameters:
resource
- base name of the resource fileid
- the id of the corresponding bundle in the resource fileencoding
- the encoding of the resource file
- Throws:
java.lang.NullPointerException
- if resource
or id
is null
java.io.UnsupportedEncodingException
- if the encoding is not supported
MessageBundle
public MessageBundle(java.lang.String resource,
java.lang.String id,
java.lang.Object[] arguments)
throws java.lang.NullPointerException
- Constructs a new MessageBundle using
resource
as the base name for the
RessourceBundle and id
as the message bundle id the resource file.
- Parameters:
resource
- base name of the resource fileid
- the id of the corresponding bundle in the resource filearguments
- an array containing the arguments for the message
- Throws:
java.lang.NullPointerException
- if resource
or id
is null
MessageBundle
public MessageBundle(java.lang.String resource,
java.lang.String id,
java.lang.String encoding,
java.lang.Object[] arguments)
throws java.lang.NullPointerException,
java.io.UnsupportedEncodingException
- Constructs a new MessageBundle using
resource
as the base name for the
RessourceBundle and id
as the message bundle id the resource file.
- Parameters:
resource
- base name of the resource fileid
- the id of the corresponding bundle in the resource fileencoding
- the encoding of the resource filearguments
- an array containing the arguments for the message
- Throws:
java.lang.NullPointerException
- if resource
or id
is null
java.io.UnsupportedEncodingException
- if the encoding is not supported
getTitle
public java.lang.String getTitle(java.util.Locale loc,
java.util.TimeZone timezone)
throws MissingEntryException
- Returns the title message in the given locale and timezone.
- Parameters:
loc
- the Locale
timezone
- the TimeZone
- Returns:
- the title message.
- Throws:
MissingEntryException
- if the message is not available
getTitle
public java.lang.String getTitle(java.util.Locale loc)
throws MissingEntryException
- Returns the title message in the given locale and the default timezone.
- Parameters:
loc
- the Locale
- Returns:
- the title message.
- Throws:
MissingEntryException
- if the message is not available