|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.omnaest.utils.propertyfile.PropertyFile
public class PropertyFile
Representation of a property file. Offers methods to load, modify and store property files.
This API supports minimal invasive modification which means that existing comments or blank lines are not discarded.
load(),
store(),
PropertyFileContent| Field Summary | |
|---|---|
protected File |
file
|
static String |
FILE_ENCODING_DEFAULT
|
protected String |
fileEncoding
|
protected PropertyFileContent |
propertyFileContent
|
| Constructor Summary | |
|---|---|
PropertyFile(File propertyFile)
|
|
PropertyFile(String propertyFileName)
|
|
| Method Summary | |
|---|---|
File |
getFile()
|
String |
getFileEncoding()
|
PropertyFileContent |
getPropertyFileContent()
|
void |
load()
Loads the PropertyFile from disc. |
void |
load(String fileContent)
Loads the PropertyFile from the given String |
void |
setFile(File file)
|
void |
setFileEncoding(String fileEncoding)
|
void |
setPropertyFileContent(PropertyFileContent propertyFileContent)
|
void |
store()
Stores the PropertyFile to disc. |
String |
toString()
Returns a String version of the current PropertyFileContent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String FILE_ENCODING_DEFAULT
protected File file
protected String fileEncoding
protected PropertyFileContent propertyFileContent
| Constructor Detail |
|---|
public PropertyFile(String propertyFileName)
public PropertyFile(File propertyFile)
| Method Detail |
|---|
public void load()
PropertyFile from disc.
public void load(String fileContent)
PropertyFile from the given String
fileContent - public String toString()
String version of the current PropertyFileContent
toString in class Objectpublic void store()
PropertyFile to disc.
public File getFile()
public void setFile(File file)
public PropertyFileContent getPropertyFileContent()
public void setPropertyFileContent(PropertyFileContent propertyFileContent)
public String getFileEncoding()
public void setFileEncoding(String fileEncoding)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||