java.lang.Object
de.grogra.pf.io.PropertyFileReader
PropertyFileReader.java
Provides functions to read properties from external files.
- Author:
- mh
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBoolean(String propertyString) Returns the specified property as boolean value.doubleReturns the specified property as double value.double[]getDoubleArray(String propertyString) Returns the specified property as array of double values.floatReturns the specified property as float value.float[]getFloatArray(String propertyString) Returns the specified property as array of float values.int[]getIntArray(String propertyString) Returns the specified property as a array of integer values.intgetInteger(String propertyString) Returns the specified property as integer value.intReturns the number of read properties.Returns the specified property as string value.String[]getStringArray(String propertyString) Returns the specified property as a array of strings.booleanload()Loading of a property file.booleanbooleanload(InputStream inFileStream) booleanbooleansave(OutputStream outFileStream) boolean
-
Constructor Details
-
PropertyFileReader
public PropertyFileReader() -
PropertyFileReader
-
PropertyFileReader
-
PropertyFileReader
-
-
Method Details
-
load
public boolean load()Loading of a property file. The file has to be set by using the constructor.- Returns:
- false, iff there was no error during loading property file.
-
load
-
load
-
save
-
save
-
save
-
getNumberOfReadProperties
public int getNumberOfReadProperties()Returns the number of read properties.- Returns:
- number of read properties
-
getBoolean
Returns the specified property as boolean value.- Parameters:
propertyString- name of the specified property- Returns:
- value of this property
-
getString
Returns the specified property as string value.- Parameters:
propertyString- name of the specified property- Returns:
- value of this property
-
getDouble
Returns the specified property as double value.- Parameters:
propertyString- name of the specified property- Returns:
- value of this property
-
getFloat
Returns the specified property as float value.- Parameters:
propertyString- name of the specified property- Returns:
- value of this property
-
getInteger
Returns the specified property as integer value.- Parameters:
propertyString- name of the specified property- Returns:
- value of this property
-
getFloatArray
Returns the specified property as array of float values.- Parameters:
propertyString- name of the specified property- Returns:
- value of this property
-
getDoubleArray
Returns the specified property as array of double values.- Parameters:
propertyString- name of the specified property- Returns:
- value of this property
-
getIntArray
Returns the specified property as a array of integer values.- Parameters:
propertyString- name of the specified property- Returns:
- value of this property
-
getStringArray
Returns the specified property as a array of strings.- Parameters:
propertyString- name of the specified property- Returns:
- value of this property
-