| Constructor and Description |
|---|
IniFile(InputStream stream) |
IniFile(String pstrPathAndName)
Create a IniFile object from the file named in the parameter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSection(String pstrSection,
String pstrComments)
Sets the comments associated with a section.
|
String[] |
getAllSectionNames()
Returns a string array containing names of all sections in INI file.
|
Boolean |
getBooleanProperty(String pstrSection,
String pstrProp)
Returns the specified boolean property from the specified section.
|
Date |
getDateProperty(String pstrSection,
String pstrProp)
Returns the specified date property from the specified section.
|
Double |
getDoubleProperty(String pstrSection,
String pstrProp)
Returns the specified double property from the specified section.
|
String |
getFileName()
Returns the ini file name being used.
|
Integer |
getIntegerProperty(String pstrSection,
String pstrProp)
Returns the specified integer property from the specified section.
|
Long |
getLongProperty(String pstrSection,
String pstrProp)
Returns the specified long property from the specified section.
|
Map<String,org.hl7.fhir.utilities.IniFile.INIProperty> |
getProperties(String pstrSection)
Returns a map containing all the properties under specified section.
|
String[] |
getPropertyNames(String pstrSection)
Returns a string array containing names of all the properties under specified section.
|
String |
getStringProperty(String pstrSection,
String pstrProp)
Returns the specified string property from the specified section.
|
Date |
getTimestampProperty(String pstrSection,
String pstrProp)
Returns the specified date property from the specified section.
|
int |
getTotalSections() |
static void |
main(String[] pstrArgs)
The main entry point for testing.
|
void |
removeProperty(String pstrSection,
String pstrProp)
Removed specified property from the specified section.
|
void |
removeSection(String pstrSection)
Removes the specified section if one exists, otherwise does nothing.
|
boolean |
save()
Flush changes back to the disk file.
|
boolean |
save(OutputStream stream) |
void |
setBooleanProperty(String pstrSection,
String pstrProp,
boolean pblnVal,
String pstrComments)
Sets the specified boolean property.
|
void |
setDateFormat(String pstrDtFmt)
Sets the format to be used to interpreat date values.
|
void |
setDateProperty(String pstrSection,
String pstrProp,
Date pdtVal,
String pstrComments)
Sets the specified java.util.Date property.
|
void |
setDoubleProperty(String pstrSection,
String pstrProp,
double pdblVal,
String pstrComments)
Sets the specified double property.
|
void |
setIntegerProperty(String pstrSection,
String pstrProp,
int pintVal,
String pstrComments)
Sets the specified integer property.
|
void |
setLongProperty(String pstrSection,
String pstrProp,
long plngVal,
String pstrComments)
Sets the specified long property.
|
void |
setStringProperty(String pstrSection,
String pstrProp,
String pstrVal,
String pstrComments)
Sets the specified string property.
|
void |
setTimeStampFormat(String pstrTSFmt)
Sets the format to be used to interpreat timestamp values.
|
void |
setTimestampProperty(String pstrSection,
String pstrProp,
Timestamp ptsVal,
String pstrComments)
Sets the specified java.sql.Timestamp property.
|
public IniFile(String pstrPathAndName)
pstrPathAndName - The full path and name of the ini file to be used.public IniFile(InputStream stream)
public String getFileName()
public String getStringProperty(String pstrSection, String pstrProp)
pstrSection - the INI section name.pstrProp - the property to be retrieved.public Boolean getBooleanProperty(String pstrSection, String pstrProp)
pstrSection - the INI section name.pstrProp - the property to be retrieved.public Integer getIntegerProperty(String pstrSection, String pstrProp)
pstrSection - the INI section name.pstrProp - the property to be retrieved.public Long getLongProperty(String pstrSection, String pstrProp)
pstrSection - the INI section name.pstrProp - the property to be retrieved.public Double getDoubleProperty(String pstrSection, String pstrProp)
pstrSection - the INI section name.pstrProp - the property to be retrieved.public Date getDateProperty(String pstrSection, String pstrProp)
pstrSection - the INI section name.pstrProp - the property to be retrieved.public Date getTimestampProperty(String pstrSection, String pstrProp)
pstrSection - the INI section name.pstrProp - the property to be retrieved.public void addSection(String pstrSection, String pstrComments)
pstrSection - the section namepstrComments - the comments.public void setStringProperty(String pstrSection, String pstrProp, String pstrVal, String pstrComments)
pstrSection - the INI section name.pstrProp - the property to be set.public void setBooleanProperty(String pstrSection, String pstrProp, boolean pblnVal, String pstrComments)
pstrSection - the INI section name.pstrProp - the property to be set.pblnVal - the boolean value to be persistedpublic void setIntegerProperty(String pstrSection, String pstrProp, int pintVal, String pstrComments)
pstrSection - the INI section name.pstrProp - the property to be set.pintVal - the int property to be persisted.public void setLongProperty(String pstrSection, String pstrProp, long plngVal, String pstrComments)
pstrSection - the INI section name.pstrProp - the property to be set.plngVal - the long value to be persisted.public void setDoubleProperty(String pstrSection, String pstrProp, double pdblVal, String pstrComments)
pstrSection - the INI section name.pstrProp - the property to be set.pdblVal - the double value to be persisted.public void setDateProperty(String pstrSection, String pstrProp, Date pdtVal, String pstrComments)
pstrSection - the INI section name.pstrProp - the property to be set.pdtVal - the date value to be persisted.public void setTimestampProperty(String pstrSection, String pstrProp, Timestamp ptsVal, String pstrComments)
pstrSection - the INI section name.pstrProp - the property to be set.ptsVal - the timestamp value to be persisted.public void setDateFormat(String pstrDtFmt) throws IllegalArgumentException
pstrDtFmt - the format stringIllegalArgumentException - if the if the given pattern is invalidpublic void setTimeStampFormat(String pstrTSFmt)
pstrTSFmt - the format stringIllegalArgumentException - if the if the given pattern is invalidpublic int getTotalSections()
public String[] getAllSectionNames()
public String[] getPropertyNames(String pstrSection)
pstrSection - the name of the section for which names of properties is to be retrieved.public Map<String,org.hl7.fhir.utilities.IniFile.INIProperty> getProperties(String pstrSection)
pstrSection - the name of the section for which properties are to be retrieved.public void removeProperty(String pstrSection, String pstrProp)
pstrSection - the section name.pstrProp - the name of the property to be removed.public void removeSection(String pstrSection)
pstrSection - the name of the section to be removed.public boolean save()
public boolean save(OutputStream stream)
Copyright © 2014–2019 University Health Network. All rights reserved.