Top Fields Constructors Methods
org.bouncycastle.i18n

public Class MessageBundle

extends TextBundle
Class Inheritance
Known Direct Subclasses
org.bouncycastle.i18n.ErrorBundle
Imports
java.io.UnsupportedEncodingException, java.util.Locale, .TimeZone

Field Summary

Modifier and TypeField and Description
public static final String
TITLE_ENTRY

title entry key

Inherited from org.bouncycastle.i18n.TextBundle:
TEXT_ENTRY

Constructor Summary

AccessConstructor and Description
public
MessageBundle(String
base name of the resource file
resource
,
String
the id of the corresponding bundle in the resource file
id
)

Constructs a new MessageBundle using resource as the base name for the RessourceBundle and id as the message bundle id the resource file.

public
MessageBundle(String
base name of the resource file
resource
,
String
the id of the corresponding bundle in the resource file
id
,
String
the encoding of the resource file
encoding
)

Constructs a new MessageBundle using resource as the base name for the RessourceBundle and id as the message bundle id the resource file.

public
MessageBundle(String
base name of the resource file
resource
,
String
the id of the corresponding bundle in the resource file
id
,
Object[]
an array containing the arguments for the message
arguments
)

Constructs a new MessageBundle using resource as the base name for the RessourceBundle and id as the message bundle id the resource file.

public
MessageBundle(String
base name of the resource file
resource
,
String
the id of the corresponding bundle in the resource file
id
,
String
the encoding of the resource file
encoding
,
Object[]
an array containing the arguments for the message
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

Modifier and TypeMethod and Description
public String

Returns:

the title message.
getTitle
(Locale
the Locale
loc
,
TimeZone timezone)

Returns the title message in the given locale and timezone.

public String

Returns:

the title message.
getTitle
(Locale
the Locale
loc
)

Returns the title message in the given locale and the default timezone.

Inherited from org.bouncycastle.i18n.TextBundle:
getTextgetText

Field Detail

TITLE_ENTRYback to summary
public static final String TITLE_ENTRY

title entry key

Constructor Detail

MessageBundleback to summary
public MessageBundle(String resource, String id) throws 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:String

base name of the resource file

id:String

the id of the corresponding bundle in the resource file

Exceptions
NullPointerException:
if resource or id is null
MessageBundleback to summary
public MessageBundle(String resource, String id, String encoding) throws NullPointerException, 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:String

base name of the resource file

id:String

the id of the corresponding bundle in the resource file

encoding:String

the encoding of the resource file

Exceptions
NullPointerException:
if resource or id is null
UnsupportedEncodingException:
if the encoding is not supported
MessageBundleback to summary
public MessageBundle(String resource, String id, Object[] arguments) throws 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:String

base name of the resource file

id:String

the id of the corresponding bundle in the resource file

arguments:Object[]

an array containing the arguments for the message

Exceptions
NullPointerException:
if resource or id is null
MessageBundleback to summary
public MessageBundle(String resource, String id, String encoding, Object[] arguments) throws NullPointerException, 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:String

base name of the resource file

id:String

the id of the corresponding bundle in the resource file

encoding:String

the encoding of the resource file

arguments:Object[]

an array containing the arguments for the message

Exceptions
NullPointerException:
if resource or id is null
UnsupportedEncodingException:
if the encoding is not supported

Method Detail

getTitleback to summary
public String getTitle(Locale loc, TimeZone timezone) throws MissingEntryException

Returns the title message in the given locale and timezone.

Parameters
loc:Locale

the Locale

timezone:TimeZone

the TimeZone

Returns:String

the title message.

Exceptions
MissingEntryException:
if the message is not available
getTitleback to summary
public String getTitle(Locale loc) throws MissingEntryException

Returns the title message in the given locale and the default timezone.

Parameters
loc:Locale

the Locale

Returns:String

the title message.

Exceptions
MissingEntryException:
if the message is not available