|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectautohit.common.Utils
A bunch of utils
EPG - Rewrite - 9Apr03| Constructor Summary | |
Utils()
|
|
| Method Summary | |
static java.lang.String |
copy(java.lang.String source,
java.lang.String dest)
Copy files. |
static java.lang.String |
copyDir(java.lang.String source,
java.lang.String dest,
boolean wipe)
Copy entire directories. |
static java.lang.String |
dot2path(java.lang.String header,
java.lang.String dot)
Converts dot namespace to a path |
static java.lang.String |
loadFile2String(java.io.File f)
Read a file into a String. |
static java.io.File |
makeFile(java.lang.String name)
Make a file reference. |
static java.lang.String |
merge(java.lang.String source,
java.lang.String dest,
org.apache.commons.collections.ExtendedProperties props)
Merge a file with properties. |
static java.lang.String |
norfIt(int value)
|
static int |
packInteger(byte[] buf)
Get a packed, big-endian integer. |
static java.lang.Object |
testGetProperty(java.lang.String key,
org.apache.commons.collections.ExtendedProperties props)
Test and get property. |
static boolean |
testGetPropertyTruth(java.lang.String key,
org.apache.commons.collections.ExtendedProperties props)
Test and get property for truth. |
static void |
unpackInteger(byte[] buf,
int offset,
int value)
Unpack an integer into an array--big-endian. |
static java.lang.String |
wipeDir(java.lang.String dest)
Wipe a directory and everything in it |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Utils()
| Method Detail |
public static java.lang.String dot2path(java.lang.String header,
java.lang.String dot)
header - prefix for the pathdot - path in dot notation
public static java.io.File makeFile(java.lang.String name)
throws java.lang.Exception
name - path name
java.lang.Exception
public static java.lang.Object testGetProperty(java.lang.String key,
org.apache.commons.collections.ExtendedProperties props)
key - key for the propertyprops - the property set
public static boolean testGetPropertyTruth(java.lang.String key,
org.apache.commons.collections.ExtendedProperties props)
key - key for the propertyprops - the property set
public static java.lang.String copy(java.lang.String source,
java.lang.String dest)
source - source file pathdest - destination file path
public static java.lang.String merge(java.lang.String source,
java.lang.String dest,
org.apache.commons.collections.ExtendedProperties props)
source - source filedest - destination fileprops - properties that are candidates for substitution
public static java.lang.String copyDir(java.lang.String source,
java.lang.String dest,
boolean wipe)
source - source is the source directory, without a training slashdest - destination is the destination directory, without a training slashwipe - destructive copy. If true, it will destroy destination directories before
copying the files. The files themselves are always overwritten.
public static java.lang.String wipeDir(java.lang.String dest)
dest - path to the directory
public static java.lang.String loadFile2String(java.io.File f)
f - File to read
public static int packInteger(byte[] buf)
buf - arracy of bytes
public static void unpackInteger(byte[] buf,
int offset,
int value)
buf - array of bytes. better be at least 4 bytesoffset - offset into the array to start the unpackvalue - the integer to unpackpublic static java.lang.String norfIt(int value)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||