|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.psepr.jClient.ParamFile
public class ParamFile
Read and process a parameter file.
A parameter file of the form:
<jClient>
<debug>
<detail>IO</detail>
<verbose/>
</debug>
<server type="registry">
<name>frog</name>
</server>
</jClient>
would create a set of params:
/jClient/debug/detail: IO /jClient/debug/verbose: null /jClient/server/@type: registry /jClient/server/name: frog
Note that is module cannot call the regular DebuggerLogger.log() routine -- that module calls this module to get configration parameters and that causes a very bad loop.
| Constructor Summary | |
|---|---|
ParamFile()
|
|
ParamFile(java.io.Reader inFile)
|
|
| Method Summary | |
|---|---|
boolean |
getParam(java.lang.String parm,
boolean deflt)
Return the value of the parameter or the default value if the parameter is either not specified or if the value is not specified. |
int |
getParam(java.lang.String parm,
int deflt)
Return the value of the parameter or the default value if the parameter is either not specified or if the value is not specified. |
long |
getParam(java.lang.String parm,
long deflt)
Return the value of the parameter or the default value if the parameter is either not specified or if the value is not specified. |
java.lang.String |
getParam(java.lang.String parm,
java.lang.String deflt)
Return the value of the parameter or the default value if the parameter is either not specified or if the value is not specified. |
boolean |
hasParam(java.lang.String parm)
return true if this parameter is in the parameter file |
boolean |
paramFlag(java.lang.String pName)
Return a boolean flag from the param file. |
java.lang.String |
paramString(java.lang.String pName)
Return a string value from the parameter file. |
void |
parseFile(java.io.Reader inFile)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ParamFile()
public ParamFile(java.io.Reader inFile)
throws java.text.ParseException
java.text.ParseException| Method Detail |
|---|
public void parseFile(java.io.Reader inFile)
throws java.text.ParseException
java.text.ParseExceptionpublic boolean paramFlag(java.lang.String pName)
pName -
public java.lang.String paramString(java.lang.String pName)
pName -
public boolean hasParam(java.lang.String parm)
parm -
public java.lang.String getParam(java.lang.String parm,
java.lang.String deflt)
parm - deflt -
public long getParam(java.lang.String parm,
long deflt)
parm - deflt -
public int getParam(java.lang.String parm,
int deflt)
parm - deflt -
public boolean getParam(java.lang.String parm,
boolean deflt)
parm - deflt -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||