|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.autonomy.utilities.JavaConfig
Class to modify configuration files
Field Summary | |
static int |
JAVACONFIG_FAILURE
Deprecated. |
static int |
JAVACONFIG_SUCCESS
Deprecated. |
Constructor Summary | |
JavaConfig()
Deprecated. JavaConfig Constructor. |
|
JavaConfig(java.lang.String sFilename)
Deprecated. Read in a file and convert it to a JavaConfig structure |
|
JavaConfig(java.lang.StringBuffer sbInput)
Deprecated. JavaConfig Constructor |
Method Summary | |
int |
addKey(java.lang.String sSectionName,
java.lang.String sKeyName,
java.lang.String sValueName)
Deprecated. Add a key to the config |
int |
changeKey(java.lang.String sSectionName,
java.lang.String sKeyName,
java.lang.String sNewValue)
Deprecated. Change a key in the specified section |
int |
createSection(java.lang.String sSectionName,
java.util.Vector vElements)
Deprecated. Add a section to the config file. |
int |
deleteKey(java.lang.String sSectionName,
java.lang.String sKeyName)
Deprecated. Deletes a Key from the config from the specified section |
int |
deleteSection(java.lang.String sSectionName)
Deprecated. Delete a section from the config file. |
void |
display()
Deprecated. Quick method to print out all of the sections |
java.lang.String |
find(java.lang.String keyName)
Deprecated. Find the specified key |
java.lang.String |
getKey(java.lang.String sSectionName,
java.lang.String sKeyName)
Deprecated. Returns the value of a key |
int |
getNumberOfSections()
Deprecated. Return the number of sections in the config |
java.lang.String |
getSection(java.lang.String sSectionName)
Deprecated. Return the contents of a specified section |
java.lang.String[] |
getSectionHeadings(boolean bStripped)
Deprecated. Get an array of section headings |
void |
parseStringBuffer(java.lang.StringBuffer sbInputBuffer)
Deprecated. This method parses the specified StringBuffer into the hashtable |
java.lang.StringBuffer |
readConfigFile(java.lang.String sFilename)
Deprecated. Read in a config file and put it into a StringBuffer, for use later |
java.lang.StringBuffer |
returnConfig()
Deprecated. Return the Configuration |
int |
writeConfig(java.lang.String sConfigFileName,
boolean dosFormat)
Deprecated. Write the config out to a file on disk |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int JAVACONFIG_SUCCESS
public static int JAVACONFIG_FAILURE
Constructor Detail |
public JavaConfig()
public JavaConfig(java.lang.StringBuffer sbInput)
sbInput
- the String buffer to extract the config frompublic JavaConfig(java.lang.String sFilename) throws java.io.FileNotFoundException
sFilename
- Fully Qualified Path of the config file to read
java.io.FileNotFoundException
- if the filename passed does not existsMethod Detail |
public java.lang.StringBuffer readConfigFile(java.lang.String sFilename) throws java.io.FileNotFoundException
sFilename
- Fully Qualified Path of the config file to read
java.io.FileNotFoundException
public java.lang.String getSection(java.lang.String sSectionName)
sSectionName
- Section to return
public int createSection(java.lang.String sSectionName, java.util.Vector vElements)
sSectionName
- Section to addvElements
- Vector containing key-pair information in the format :
KEY=VALUE [white space is ignored]
Each separate key-pair must be an element of the Vector
public int deleteSection(java.lang.String sSectionName)
sSectionName
- Section to delete
public java.lang.String getKey(java.lang.String sSectionName, java.lang.String sKeyName)
sSectionName
- Name of the section in which the key resides. If you don't know, use the find functionsKeyName
- Name of the key value to return,
public int addKey(java.lang.String sSectionName, java.lang.String sKeyName, java.lang.String sValueName)
sSectionName
- Section in which to place the keysKeyName
- KeynamesValueName
- Value for the key
public int deleteKey(java.lang.String sSectionName, java.lang.String sKeyName)
sSectionName
- section from which to delete the keysKeyName
- key to delete
public java.lang.String find(java.lang.String keyName)
keyName
- key to find
public int changeKey(java.lang.String sSectionName, java.lang.String sKeyName, java.lang.String sNewValue)
sSectionName
- section in which the key residessKeyName
- key to changesNewValue
- new value for the keypublic int getNumberOfSections()
public java.lang.String[] getSectionHeadings(boolean bStripped)
bStripped
- to indicate whether you want to remove the [ and ] delimiters
public void parseStringBuffer(java.lang.StringBuffer sbInputBuffer)
public void display()
public java.lang.StringBuffer returnConfig()
public int writeConfig(java.lang.String sConfigFileName, boolean dosFormat)
sConfigFileName
- Name of the config file to createdosFormat
- whether to end each line with \n\r or just \n
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |