org.jutil
Class TProperties

java.lang.Object
  extended by org.jutil.TProperties

public final class TProperties
extends java.lang.Object

This is the TProperties utility code class.


Constructor Summary
TProperties()
          this class is now creatable to be used in velocity context.put("tprops", new TProperties()); #set( $props = $tprops.create() )
 
Method Summary
static java.util.Properties create()
           
static void dump(java.util.Properties properties, java.io.File file)
          usage: org.jutil.TProperties.dump(System.getProperties(), new File("dump.file"));
static void dump(java.util.Properties properties, java.io.PrintWriter out)
          usage: org.jutil.TProperties.dump(System.getProperties(), new java.io.PrintWriter(System.out, true));
static java.util.Properties load(java.io.File file)
          usage: File mfile = new File("someDir", "myFileName); Properties properties = org.jutil.TProperties.load(myFile);
static java.util.Properties load(java.io.InputStream istream)
           
static java.util.Properties load(java.util.Properties props, java.net.URL url)
          usage: Properties properties = org.jutil.TProperties.load(props, "http://...");
static java.util.Properties load(java.lang.String fileName)
          usage: Properties properties = org.jutil.TProperties.load("myFileName);
static java.util.Properties load(java.net.URL url)
          usage: Properties properties = org.jutil.TProperties.load("http://...");
static void save(java.io.File file, java.util.Properties properties)
          usage: File mfile = new File("someDir", "myFileName"); Properties properties = org.jutil.TProperties.save(file, properties);
static void save(java.io.File file, java.util.Properties properties, java.lang.String header)
          usage: File file = new File("someDir", "myFileName"); org.jutil.TProperties.saveSorted(file, properties, "programming by Peter Blakely");
static void save(java.util.Properties properties, java.io.OutputStream out, java.lang.String header, boolean sorted)
           
static void save(java.lang.String fileName, java.util.Properties properties)
          usage: org.jutil.TProperties.save("myFileName", properties);
static void save(java.lang.String fileName, java.util.Properties properties, java.lang.String header)
          usage: org.jutil.TProperties.save("myFileName", properties, "programming by Peter Blakely");
static void saveSorted(java.io.File file, java.util.Properties properties)
          usage: File mfile = new File("someDir", "myFileName"); org.jutil.TProperties.save(file, properties);
static void saveSorted(java.io.File file, java.util.Properties properties, java.lang.String header)
          usage: File file = new File("someDir", "myFileName"); Properties properties = org.jutil.TProperties.save(file, properties, "programming by Peter Blakely");
static void saveSorted(java.lang.String fileName, java.util.Properties properties)
          usage: org.jutil.TProperties.saveSorted("myFileName", properties);
static void saveSorted(java.lang.String fileName, java.util.Properties properties, java.lang.String header)
          usage: Porg.jutil.TProperties.saveSorted("myFileName", properties, "programming by Peter Blakely");
static java.lang.String toString(java.util.Properties properties)
          usage: org.jutil.TProperties.toString(System.getProperties());
static java.lang.String[] toStringArray(java.util.Properties properties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TProperties

public TProperties()
this class is now creatable to be used in velocity context.put("tprops", new TProperties()); #set( $props = $tprops.create() )

Method Detail

load

public static final java.util.Properties load(java.util.Properties props,
                                              java.net.URL url)
                                       throws java.net.MalformedURLException,
                                              java.io.IOException
usage: Properties properties = org.jutil.TProperties.load(props, "http://...");

Throws:
java.net.MalformedURLException
java.io.IOException

load

public static final java.util.Properties load(java.net.URL url)
                                       throws java.net.MalformedURLException,
                                              java.io.IOException
usage: Properties properties = org.jutil.TProperties.load("http://...");

Throws:
java.net.MalformedURLException
java.io.IOException

create

public static final java.util.Properties create()

load

public static final java.util.Properties load(java.lang.String fileName)
                                       throws java.io.IOException
usage: Properties properties = org.jutil.TProperties.load("myFileName);

Throws:
java.io.IOException

load

public static final java.util.Properties load(java.io.File file)
                                       throws java.io.IOException
usage: File mfile = new File("someDir", "myFileName); Properties properties = org.jutil.TProperties.load(myFile);

Throws:
java.io.IOException

load

public static final java.util.Properties load(java.io.InputStream istream)
                                       throws java.io.IOException
Throws:
java.io.IOException

save

public static final void save(java.lang.String fileName,
                              java.util.Properties properties)
                       throws java.io.IOException
usage: org.jutil.TProperties.save("myFileName", properties);

Throws:
java.io.IOException

saveSorted

public static final void saveSorted(java.lang.String fileName,
                                    java.util.Properties properties)
                             throws java.io.IOException
usage: org.jutil.TProperties.saveSorted("myFileName", properties);

Throws:
java.io.IOException

save

public static final void save(java.lang.String fileName,
                              java.util.Properties properties,
                              java.lang.String header)
                       throws java.io.IOException
usage: org.jutil.TProperties.save("myFileName", properties, "programming by Peter Blakely");

Throws:
java.io.IOException

saveSorted

public static final void saveSorted(java.lang.String fileName,
                                    java.util.Properties properties,
                                    java.lang.String header)
                             throws java.io.IOException
usage: Porg.jutil.TProperties.saveSorted("myFileName", properties, "programming by Peter Blakely");

Throws:
java.io.IOException

save

public static final void save(java.io.File file,
                              java.util.Properties properties)
                       throws java.io.IOException
usage: File mfile = new File("someDir", "myFileName"); Properties properties = org.jutil.TProperties.save(file, properties);

Throws:
java.io.IOException

saveSorted

public static final void saveSorted(java.io.File file,
                                    java.util.Properties properties)
                             throws java.io.IOException
usage: File mfile = new File("someDir", "myFileName"); org.jutil.TProperties.save(file, properties);

Throws:
java.io.IOException

save

public static final void save(java.io.File file,
                              java.util.Properties properties,
                              java.lang.String header)
                       throws java.io.IOException
usage: File file = new File("someDir", "myFileName"); org.jutil.TProperties.saveSorted(file, properties, "programming by Peter Blakely");

Throws:
java.io.IOException

saveSorted

public static final void saveSorted(java.io.File file,
                                    java.util.Properties properties,
                                    java.lang.String header)
                             throws java.io.IOException
usage: File file = new File("someDir", "myFileName"); Properties properties = org.jutil.TProperties.save(file, properties, "programming by Peter Blakely");

Throws:
java.io.IOException

save

public static void save(java.util.Properties properties,
                        java.io.OutputStream out,
                        java.lang.String header,
                        boolean sorted)
                 throws java.io.IOException
Throws:
java.io.IOException

toStringArray

public static final java.lang.String[] toStringArray(java.util.Properties properties)

toString

public static final java.lang.String toString(java.util.Properties properties)
usage: org.jutil.TProperties.toString(System.getProperties());


dump

public static final void dump(java.util.Properties properties,
                              java.io.PrintWriter out)
usage: org.jutil.TProperties.dump(System.getProperties(), new java.io.PrintWriter(System.out, true));


dump

public static final void dump(java.util.Properties properties,
                              java.io.File file)
                       throws java.io.IOException
usage: org.jutil.TProperties.dump(System.getProperties(), new File("dump.file"));

Throws:
java.io.IOException