|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.spy.util.SpyUtil
public class SpyUtil
Miscellaneous utilities.
| Method Summary | |
|---|---|
static java.lang.String |
byteAToHexString(byte[] me)
Get a string representing the hexidecimal value of the given byte array. |
static java.lang.String |
deHTML(java.lang.String contents)
Remove HTML tags from a string. |
static java.lang.Boolean |
getBoolean(boolean b)
Get a boolean instance. |
static java.lang.Boolean |
getBoolean(java.lang.String s)
Returns a Boolean with a value represented by the specified String. |
static java.lang.String |
getFileData(java.io.File file)
Return the contents of a file as a string. |
static java.lang.String |
getReaderAsString(java.io.Reader r)
Load the contents of the given reader as a String. |
static java.lang.String |
join(java.util.Collection c,
java.lang.String on)
Join a Collection of Objects on a join string. |
static java.lang.String |
join(java.util.Enumeration e,
java.lang.String on)
Join an Enumeration of Strings on a join string. |
static java.lang.String |
join(java.util.Iterator i,
java.lang.String on)
Join an Iterator of Objects on a join string. |
static void |
rmDashR(java.io.File tmp)
Recursively remove a path. |
static void |
runClass(java.lang.ClassLoader cl,
java.lang.String classname,
java.lang.String[] args)
Class invoker (runs main(String[]) from a String array. |
static void |
runClass(java.lang.String classname,
java.lang.String[] args)
Class invoker (runs main(String[]) from a String array. |
static java.lang.Object[] |
shuffle(java.lang.Object[] in)
Shuffle (unsort) an array. |
static java.lang.String[] |
split(java.lang.String on,
java.lang.String input)
Split a string based on a tokenizer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.Object[] shuffle(java.lang.Object[] in)
in - The array of objects to shuffle.
public static java.lang.String[] split(java.lang.String on,
java.lang.String input)
on - the string to split on (from StringTokenizer)input - the string that needs to be splitStringTokenizer
public static java.lang.String getReaderAsString(java.io.Reader r)
throws java.io.IOException
r - a reader
java.io.IOException
public static java.lang.String getFileData(java.io.File file)
throws java.io.IOException
file - File to read.
java.io.IOException - Thrown if the file cannot be opened.
public static java.lang.String join(java.util.Enumeration e,
java.lang.String on)
e - The enumerationon - the join string
public static java.lang.String join(java.util.Iterator i,
java.lang.String on)
i - the iterator of Objectson - the join string
public static java.lang.String join(java.util.Collection c,
java.lang.String on)
c - the collectionon - the join string
public static java.lang.String byteAToHexString(byte[] me)
me - the byte array that needs hexified.
public static void runClass(java.lang.String classname,
java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
public static void runClass(java.lang.ClassLoader cl,
java.lang.String classname,
java.lang.String[] args)
throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.Boolean getBoolean(java.lang.String s)
s - the string
public static java.lang.Boolean getBoolean(boolean b)
b - the type of Boolean instance you want
public static java.lang.String deHTML(java.lang.String contents)
contents - the string whose HTML tags need removed.
public static void rmDashR(java.io.File tmp)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||