|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<java.lang.Object,java.lang.Object>
java.util.Properties
simple.util.URLProperties
public class URLProperties
The URLProperties
object is used as a convienience
class that is used to create a Properties
object
from a URL. This will automatically load the Java properties
file once instantiated. This is used so that the creation and
use of a java.util.Properties
file is much cleaner.
Field Summary |
---|
Fields inherited from class java.util.Properties |
---|
defaults |
Constructor Summary | |
---|---|
URLProperties(java.lang.String source)
Constructor for the URLProperties object. |
|
URLProperties(java.net.URL source)
Constructor for the URLProperties object. |
Method Summary | |
---|---|
void |
load(java.io.InputStream source)
This overloads the Properties.load so that XML
properties can be loaded as well as standard properties. |
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
Methods inherited from class java.util.Hashtable |
---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public URLProperties(java.lang.String source) throws java.io.IOException
URLProperties
object. The
constructor will use the specified URL as the contents of
its properties. The URL source must point to a valid Java
properties file, using a URL scheme such as HTTP or FTP.
For example "http://host/data.properties" will use HTTP.
source
- this is the URL that contains the properties
java.io.IOException
- if the properties can not be loadedpublic URLProperties(java.net.URL source) throws java.io.IOException
URLProperties
object. The
constructor will use the specified URL as the contents of
its properties. The URL source must point to a valid Java
properties file, using a URL scheme such as HTTP or FTP.
For example "http://host/data.properties" will use HTTP.
source
- this is the URL that contains the properties
java.io.IOException
- if the properties can not be loadedMethod Detail |
---|
public void load(java.io.InputStream source) throws java.io.IOException
Properties.load
so that XML
properties can be loaded as well as standard properties.
Once this method is invoked the stream is examined to see
if the properties format is in XML. If the file is a valid
XML file then the properties are loaded int he XML format.
Otherwise they are loaded using the traditional format.
load
in class java.util.Properties
source
- the stream that contains the properties
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |