public class UTF8PropertyUtils
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
UTF8PropertyUtils()
Don't allow instantiation, do allow overrides.
|
Modifier and Type | Method and Description |
---|---|
static UTF8Properties |
loadUTF8Properties(java.lang.String propertiesFileName)
Load properties from a specified file.
|
static UTF8Properties |
loadUTF8Properties(java.net.URL propertiesURL)
Load properties from a specified URL.
|
static UTF8Properties |
loadUTF8Properties(java.net.URL propertiesURL,
UTF8Properties defaultProperties)
Load properties from a specified URL and default properties.
|
static UTF8Properties |
loadUTF8PropertiesFromString(java.lang.String propertiesString)
Load properties from a string.
|
static void |
saveUTF8Properties(UTF8Properties properties,
java.lang.String propertiesFileName,
java.lang.String header)
Save properties to a specified file.
|
static void |
saveUTF8PropertiesToString(UTF8Properties properties,
java.lang.String propertiesString,
java.lang.String header)
Saves properties to a specified string.
|
protected UTF8PropertyUtils()
public static UTF8Properties loadUTF8Properties(java.lang.String propertiesFileName) throws java.io.IOException, java.io.FileNotFoundException
propertiesFileName
- File name of properties file to read.java.io.FileNotFoundException
- if properties file not found.java.io.IOException
- if properties file cannot be read.public static UTF8Properties loadUTF8Properties(java.net.URL propertiesURL) throws java.io.IOException, java.io.FileNotFoundException
propertiesURL
- URL of properties file to read.java.io.IOException
- if properties file cannot be read.java.io.FileNotFoundException
public static UTF8Properties loadUTF8Properties(java.net.URL propertiesURL, UTF8Properties defaultProperties) throws java.io.IOException, java.io.FileNotFoundException
propertiesURL
- URL of properties file to read.defaultProperties
- Default properties.java.io.IOException
- if properties file cannot be read.java.io.FileNotFoundException
public static void saveUTF8Properties(UTF8Properties properties, java.lang.String propertiesFileName, java.lang.String header) throws java.io.IOException
properties
- UTF8Properties collection to save.propertiesFileName
- Name of file to save to.header
- Header line describing properties.java.io.IOException
- if properties file cannot be saved.public static UTF8Properties loadUTF8PropertiesFromString(java.lang.String propertiesString) throws java.io.IOException
propertiesString
- String containing properties to read.java.io.IOException
- if properties cannot be read from string.public static void saveUTF8PropertiesToString(UTF8Properties properties, java.lang.String propertiesString, java.lang.String header) throws java.io.IOException
properties
- -- properties collection to save.header
- -- header line describing properties.java.io.IOException
- if properties cannot be saved to string.