JTools

org.jtools.props
Class SimpleProperties

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<Object,Object>
          extended by java.util.Properties
              extended by org.jtools.props.SimpleProperties
All Implemented Interfaces:
Serializable, Cloneable, Map<Object,Object>
Direct Known Subclasses:
ResolvedProperties

public class SimpleProperties
extends Properties

TODO type-description

Author:
Rainer Noack
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
  SimpleProperties()
           
  SimpleProperties(Properties defaults)
           
  SimpleProperties(Properties defaults, SystemPropertyMode systemPropertyMode)
           
  SimpleProperties(Properties defaults, SystemPropertyMode systemPropertyMode, String systemPropertyPrefix)
           
protected SimpleProperties(SimpleProperties props)
           
  SimpleProperties(String systemPropertyPrefix)
           
  SimpleProperties(SystemPropertyMode systemPropertyMode)
           
 
Method Summary
 Object clone()
           
protected  URL getAsUrl(String fileOrUrl)
           
 Properties getDefaults()
           
 String getFilename()
           
 String getFilenameProperty()
           
protected  SimplePropertyStyle getInternalStyle()
           
 String getLoadPath()
           
 PropertyStyle getStyle()
           
protected  void initFromParent(Properties parent)
           
 Enumeration<Object> keys()
           
 void list(PrintStream out)
           
 void list(PrintStream out, String prefix, String filter)
           
 void list(PrintWriter out)
           
 void list(PrintWriter out, String prefix, String filter)
          list Method
 LoadReturnCode load(File file)
           
 void load(InputStream inStream)
           
 LoadReturnCode load(InputStream inStream, String filename)
           
 LoadReturnCode load(Properties overwrites)
           
 LoadReturnCode load(Properties overwrites, File file)
           
 LoadReturnCode load(Properties Overwrites, InputStream inStream)
           
 LoadReturnCode load(Properties Overwrites, InputStream inStream, String filename)
           
 LoadReturnCode load(Properties overwrites, String fileOrUrl)
           
 LoadReturnCode load(Properties overwrites, URL url)
           
 LoadReturnCode load(String fileOrUrl)
           
 LoadReturnCode load(URL url)
           
protected  LoadReturnCode loadInternal(Properties overwrites)
           
protected  LoadReturnCode loadInternal(Properties overwrites, InputStream inStream, String filename)
           
protected  LoadReturnCode loadInternal(Properties overwrites, String fileOrUrl)
           
protected  LoadReturnCode loadInternal(Properties overwrites, URL url)
           
protected  LoadReturnCode onLoad(Properties overwrites, InputStream inStream)
          to overwrite in derived classes.
protected  void originalLoad(InputStream inStream)
           
 void putAll(Properties m, boolean overwrite)
           
 void putAll(Properties m, boolean overwrite, String prefix)
           
 void putAll(Properties m, String prefix)
           
protected  void setFilename(String filename)
           
 void setFilenameProperty(String prop)
           
protected  void setLoadPath(String loadPath)
           
 void setStyle(PropertyStyle style)
           
 void storeSorted(OutputStream out, String comments)
           
 
Methods inherited from class java.util.Properties
getProperty, getProperty, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML
 
Methods inherited from class java.util.Hashtable
clear, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleProperties

public SimpleProperties()

SimpleProperties

public SimpleProperties(Properties defaults)

SimpleProperties

public SimpleProperties(Properties defaults,
                        SystemPropertyMode systemPropertyMode)

SimpleProperties

public SimpleProperties(Properties defaults,
                        SystemPropertyMode systemPropertyMode,
                        String systemPropertyPrefix)

SimpleProperties

protected SimpleProperties(SimpleProperties props)

SimpleProperties

public SimpleProperties(String systemPropertyPrefix)

SimpleProperties

public SimpleProperties(SystemPropertyMode systemPropertyMode)
Method Detail

clone

public Object clone()
Overrides:
clone in class Hashtable<Object,Object>

getAsUrl

protected final URL getAsUrl(String fileOrUrl)
                      throws IOException
Throws:
IOException

getDefaults

public final Properties getDefaults()

getFilename

public final String getFilename()

getFilenameProperty

public final String getFilenameProperty()

getInternalStyle

protected final SimplePropertyStyle getInternalStyle()

getLoadPath

public final String getLoadPath()

getStyle

public final PropertyStyle getStyle()

initFromParent

protected final void initFromParent(Properties parent)

keys

public Enumeration<Object> keys()
Overrides:
keys in class Hashtable<Object,Object>

list

public final void list(PrintStream out)
Overrides:
list in class Properties

list

public final void list(PrintStream out,
                       String prefix,
                       String filter)

list

public final void list(PrintWriter out)
Overrides:
list in class Properties

list

public final void list(PrintWriter out,
                       String prefix,
                       String filter)
list Method


load

public final LoadReturnCode load(File file)
                          throws IOException
Throws:
IOException

load

public final void load(InputStream inStream)
                throws IOException
Overrides:
load in class Properties
Throws:
IOException

load

public final LoadReturnCode load(InputStream inStream,
                                 String filename)
                          throws IOException
Throws:
IOException

load

public final LoadReturnCode load(Properties overwrites)
                          throws IOException
Throws:
IOException

load

public final LoadReturnCode load(Properties overwrites,
                                 File file)
                          throws IOException
Throws:
IOException

load

public final LoadReturnCode load(Properties Overwrites,
                                 InputStream inStream)
                          throws IOException
Throws:
IOException

load

public final LoadReturnCode load(Properties Overwrites,
                                 InputStream inStream,
                                 String filename)
                          throws IOException
Throws:
IOException

load

public final LoadReturnCode load(Properties overwrites,
                                 String fileOrUrl)
                          throws IOException
Throws:
IOException

load

public final LoadReturnCode load(Properties overwrites,
                                 URL url)
                          throws IOException
Throws:
IOException

load

public final LoadReturnCode load(String fileOrUrl)
                          throws IOException
Throws:
IOException

load

public final LoadReturnCode load(URL url)
                          throws IOException
Throws:
IOException

loadInternal

protected final LoadReturnCode loadInternal(Properties overwrites)
                                     throws IOException
Throws:
IOException

loadInternal

protected final LoadReturnCode loadInternal(Properties overwrites,
                                            InputStream inStream,
                                            String filename)
                                     throws IOException
Throws:
IOException

loadInternal

protected final LoadReturnCode loadInternal(Properties overwrites,
                                            String fileOrUrl)
                                     throws IOException
Throws:
IOException

loadInternal

protected final LoadReturnCode loadInternal(Properties overwrites,
                                            URL url)
                                     throws IOException
Throws:
IOException

onLoad

protected LoadReturnCode onLoad(Properties overwrites,
                                InputStream inStream)
                         throws IOException
to overwrite in derived classes.

Throws:
IOException

originalLoad

protected final void originalLoad(InputStream inStream)
                           throws IOException
Throws:
IOException

putAll

public final void putAll(Properties m,
                         boolean overwrite)

putAll

public final void putAll(Properties m,
                         boolean overwrite,
                         String prefix)

putAll

public final void putAll(Properties m,
                         String prefix)

setFilename

protected final void setFilename(String filename)

setFilenameProperty

public final void setFilenameProperty(String prop)

setLoadPath

protected final void setLoadPath(String loadPath)

setStyle

public final void setStyle(PropertyStyle style)

storeSorted

public void storeSorted(OutputStream out,
                        String comments)
                 throws IOException
Throws:
IOException

JTools

© 2000-2006, JTools.org.