|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.file.PropertyFileLoader
public class PropertyFileLoader
Provides some static convenience methods to load properties from property files. The files will be searched on the classpath. They will be properly loaded even from files inside archives.
| Method Summary | |
|---|---|
static PropertiesFileContent |
loadFullPropertiesFile(java.io.InputStream stream)
Reads all text lines from the given stream and returns the result in an PropertiesFileContent object. |
static PropertiesFileContent |
loadFullPropertiesFile(java.io.Reader reader)
Reads all text lines from the given stream and returns the result in an PropertiesFileContent object. |
static PropertiesFileContent |
loadFullPropertiesFile(java.lang.String filename)
Reads all text lines from the given file and returns the result in an PropertiesFileContent object. |
static java.util.Properties |
loadProperties(java.io.File file)
Loads all properties from the given file. |
static java.util.Properties |
loadProperties(FileLocator locator)
Loads all properties from the specified file. |
static java.util.Properties |
loadProperties(FileLocator locator,
java.util.Properties defaults)
Load all properties from the given file. |
static java.util.Properties |
loadProperties(java.io.File file,
java.util.Properties defaults)
Load all properties from the given file. |
static java.util.Properties |
loadProperties(java.io.InputStream stream)
Loads all properties from the given stream. |
static java.util.Properties |
loadProperties(java.io.InputStream stream,
java.util.Properties defaults)
Loads all properties from the given stream. |
static java.util.Properties |
loadProperties(java.lang.String filename)
Loads all properties from the file with the given name. |
static java.util.Properties |
loadProperties(java.lang.String filename,
java.util.Properties defaults)
Loads all properties from the file with the given name. |
static java.util.Properties |
loadProperties(java.net.URL url,
java.util.Properties defaults)
Load all properties from the file specified by the given URL. |
boolean |
processLine(java.lang.String line,
int lineNo)
Processes each line that is read from the file |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.util.Properties loadProperties(java.lang.String filename)
public static java.util.Properties loadProperties(java.lang.String filename,
java.util.Properties defaults)
public static java.util.Properties loadProperties(java.io.File file)
public static java.util.Properties loadProperties(java.io.File file,
java.util.Properties defaults)
public static java.util.Properties loadProperties(FileLocator locator)
public static java.util.Properties loadProperties(FileLocator locator,
java.util.Properties defaults)
public static java.util.Properties loadProperties(java.net.URL url,
java.util.Properties defaults)
url - The url that specifies the file to read the properties fromdefaults - The default properties to be put into the result (may be null)
public static java.util.Properties loadProperties(java.io.InputStream stream,
java.util.Properties defaults)
throws java.io.IOException
stream - The stream to read the properties fromdefaults - The default properties (might be null)
java.io.IOException
public static java.util.Properties loadProperties(java.io.InputStream stream)
throws java.io.IOException
stream - The stream to read the properties from
java.io.IOException
public static PropertiesFileContent loadFullPropertiesFile(java.lang.String filename)
throws java.io.IOException
filename - The name of the file to read (can be also a URL)
java.io.IOException
public static PropertiesFileContent loadFullPropertiesFile(java.io.Reader reader)
throws java.io.IOException
reader - The reader to load the data from
java.io.IOException
public static PropertiesFileContent loadFullPropertiesFile(java.io.InputStream stream)
throws java.io.IOException
stream - The stream to read the data from
java.io.IOException
public boolean processLine(java.lang.String line,
int lineNo)
processLine in interface LineProcessorline - The line to process (must not be null)lineNo - The linen number (starting with 1)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||