Package org.bouncycastle.i18n
Class ErrorBundle
- java.lang.Object
-
- org.bouncycastle.i18n.LocalizedMessage
-
- org.bouncycastle.i18n.TextBundle
-
- org.bouncycastle.i18n.MessageBundle
-
- org.bouncycastle.i18n.ErrorBundle
-
public class ErrorBundle extends MessageBundle
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.bouncycastle.i18n.LocalizedMessage
LocalizedMessage.FilteredArguments
-
-
Field Summary
Fields Modifier and Type Field Description static String
DETAIL_ENTRY
detail entry keystatic String
SUMMARY_ENTRY
summary entry key-
Fields inherited from class org.bouncycastle.i18n.MessageBundle
TITLE_ENTRY
-
Fields inherited from class org.bouncycastle.i18n.TextBundle
TEXT_ENTRY
-
Fields inherited from class org.bouncycastle.i18n.LocalizedMessage
arguments, DEFAULT_ENCODING, encoding, extraArgs, filter, id, loader, resource
-
-
Constructor Summary
Constructors Constructor Description ErrorBundle(String resource, String id)
Constructs a new ErrorBundle usingresource
as the base name for the RessourceBundle andid
as the message bundle id the resource file.ErrorBundle(String resource, String id, Object[] arguments)
Constructs a new ErrorBundle usingresource
as the base name for the RessourceBundle andid
as the message bundle id the resource file.ErrorBundle(String resource, String id, String encoding)
Constructs a new ErrorBundle usingresource
as the base name for the RessourceBundle andid
as the message bundle id the resource file.ErrorBundle(String resource, String id, String encoding, Object[] arguments)
Constructs a new ErrorBundle usingresource
as the base name for the RessourceBundle andid
as the message bundle id the resource file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDetail(Locale loc)
Returns the detail message in the given locale and the default timezone.String
getDetail(Locale loc, TimeZone timezone)
Returns the detail message in the given locale and timezone.String
getSummary(Locale loc)
Returns the summary message in the given locale and the default timezone.String
getSummary(Locale loc, TimeZone timezone)
Returns the summary message in the given locale and timezone.-
Methods inherited from class org.bouncycastle.i18n.MessageBundle
getTitle, getTitle
-
Methods inherited from class org.bouncycastle.i18n.TextBundle
getText, getText
-
Methods inherited from class org.bouncycastle.i18n.LocalizedMessage
addExtraArgs, formatWithTimeZone, getArguments, getClassLoader, getEntry, getExtraArgs, getFilter, getId, getResource, setClassLoader, setExtraArgument, setExtraArguments, setFilter, toString
-
-
-
-
Field Detail
-
SUMMARY_ENTRY
public static final String SUMMARY_ENTRY
summary entry key- See Also:
- Constant Field Values
-
DETAIL_ENTRY
public static final String DETAIL_ENTRY
detail entry key- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ErrorBundle
public ErrorBundle(String resource, String id) throws NullPointerException
Constructs a new ErrorBundle usingresource
as the base name for the RessourceBundle andid
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:
NullPointerException
- ifresource
orid
isnull
-
ErrorBundle
public ErrorBundle(String resource, String id, String encoding) throws NullPointerException, UnsupportedEncodingException
Constructs a new ErrorBundle usingresource
as the base name for the RessourceBundle andid
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:
NullPointerException
- ifresource
orid
isnull
UnsupportedEncodingException
- if the encoding is not supported
-
ErrorBundle
public ErrorBundle(String resource, String id, Object[] arguments) throws NullPointerException
Constructs a new ErrorBundle usingresource
as the base name for the RessourceBundle andid
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:
NullPointerException
- ifresource
orid
isnull
-
ErrorBundle
public ErrorBundle(String resource, String id, String encoding, Object[] arguments) throws NullPointerException, UnsupportedEncodingException
Constructs a new ErrorBundle usingresource
as the base name for the RessourceBundle andid
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:
NullPointerException
- ifresource
orid
isnull
UnsupportedEncodingException
- if the encoding is not supported
-
-
Method Detail
-
getSummary
public String getSummary(Locale loc, TimeZone timezone) throws MissingEntryException
Returns the summary message in the given locale and timezone.- Parameters:
loc
- theLocale
timezone
- theTimeZone
- Returns:
- the summary message.
- Throws:
MissingEntryException
- if the message is not available
-
getSummary
public String getSummary(Locale loc) throws MissingEntryException
Returns the summary message in the given locale and the default timezone.- Parameters:
loc
- theLocale
- Returns:
- the summary message.
- Throws:
MissingEntryException
- if the message is not available
-
getDetail
public String getDetail(Locale loc, TimeZone timezone) throws MissingEntryException
Returns the detail message in the given locale and timezone.- Parameters:
loc
- theLocale
timezone
- theTimeZone
- Returns:
- the detail message.
- Throws:
MissingEntryException
- if the message is not available
-
getDetail
public String getDetail(Locale loc) throws MissingEntryException
Returns the detail message in the given locale and the default timezone.- Parameters:
loc
- theLocale
- Returns:
- the detail message.
- Throws:
MissingEntryException
- if the message is not available
-
-