net.kbox.common
Class MsgResource

java.lang.Object
  extended by net.kbox.common.MsgResource

public class MsgResource
extends java.lang.Object

MsgResource is used for internationalization of application.

Since:
1.03
Author:
blackBox

Method Summary
 void clear()
          Clear resource in ram
 java.lang.Object get(java.lang.String name)
           
 double getDouble(java.lang.String name)
           
 float getFloat(java.lang.String name)
           
static MsgResource getInstance()
          Create a MsgResource instance.
 int getInt(java.lang.String name)
           
 long getLong(java.lang.String name)
           
 java.lang.String getMsg(java.lang.String name)
          Get the message in resource file with specified name.
 short getShort(java.lang.String name)
           
 MsgResource loadRes()
          Load resource file with default path "/res.property".
 MsgResource loadRes(java.lang.String path)
          Load resource file with specified path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static MsgResource getInstance()
Create a MsgResource instance.

Returns:
MsgResource

loadRes

public MsgResource loadRes()
Load resource file with default path "/res.property".

Returns:
MsgResource

loadRes

public MsgResource loadRes(java.lang.String path)
Load resource file with specified path.

Parameters:
path - resource file path
Returns:
MsgResource

clear

public void clear()
Clear resource in ram


getMsg

public java.lang.String getMsg(java.lang.String name)
Get the message in resource file with specified name.

Parameters:
name - name of message
Returns:
message

getInt

public int getInt(java.lang.String name)

getDouble

public double getDouble(java.lang.String name)

getShort

public short getShort(java.lang.String name)

getLong

public long getLong(java.lang.String name)

getFloat

public float getFloat(java.lang.String name)

get

public java.lang.Object get(java.lang.String name)