public class MessageBundle
extends java.lang.Object
| Constructor and Description |
|---|
MessageBundle() |
| Modifier and Type | Method and Description |
|---|---|
Message |
getMessage(java.lang.String key)
Get the message object based on the key value passed.
|
java.lang.String |
getName()
Return the name of the message bundle
This is set to the parmaters that is passed to the loadFromFile method.
|
void |
loadFromFile(java.lang.String filename)
Load the message bundle from a file.
|
void |
loadFromReader(java.io.InputStreamReader reader)
Load the message bundle from the given reader.
|
void |
loadFromStream(java.io.InputStream inputStream)
Load the message bundle from the given stream.
|
static void |
main(java.lang.String[] args)
Main rountine used for testing purposes only
Currently this is hard coded to pick up the file test.txt
|
java.lang.String |
toString()
Used to dump the contents of the message bundle
|
public void loadFromFile(java.lang.String filename)
throws java.io.IOException
filename - java.io.IOExceptionpublic void loadFromStream(java.io.InputStream inputStream)
throws java.io.IOException
InputStream - java.io.IOExceptionpublic void loadFromReader(java.io.InputStreamReader reader)
throws java.io.IOException
InputStreamReader - java.io.IOExceptionpublic java.lang.String getName()
public Message getMessage(java.lang.String key)
public java.lang.String toString()
toString in class java.lang.Objectpublic static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception