|
||||||||||
| 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 String |
byteAToHexString(byte[] me)
Get a string representing the hexidecimal value of the given byte array. |
|
static String |
deHTML(String contents)
Remove HTML tags from a string. |
|
static Boolean |
getBoolean(String s)
Returns a Boolean with a value represented by the specified String. |
|
static String |
getFileData(File file)
Return the contents of a file as a string. |
|
static String |
getReaderAsString(Reader r)
Load the contents of the given reader as a String. |
|
static String |
join(Collection<?> c,
String on)
Join a Collection of Objects on a join string. |
|
static
|
join(Enumeration<T> e,
String on)
Join an Enumeration of Strings on a join string. |
|
static String |
join(Iterator<?> i,
String on)
Join an Iterator of Objects on a join string. |
|
static void |
rmDashR(File tmp)
Recursively remove a path. |
|
static void |
runClass(ClassLoader cl,
String classname,
String[] args)
Class invoker (runs main(String[]) from a String array. |
|
static void |
runClass(String classname,
String[] args)
Class invoker (runs main(String[]) from a String array. |
|
static Object[] |
shuffle(Object[] in)
Shuffle (unsort) an array. |
|
static String[] |
split(String on,
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 Object[] shuffle(Object[] in)
in - The array of objects to shuffle.
public static String[] split(String on,
String input)
on - the string to split on (from StringTokenizer)input - the string that needs to be splitStringTokenizer
public static String getReaderAsString(Reader r)
throws IOException
r - a reader
IOException
public static String getFileData(File file)
throws IOException
file - File to read.
IOException - Thrown if the file cannot be opened.
public static <T> String join(Enumeration<T> e,
String on)
e - The enumerationon - the join string
public static String join(Iterator<?> i,
String on)
i - the iterator of Objectson - the join string
public static String join(Collection<?> c,
String on)
c - the collectionon - the join string
public static String byteAToHexString(byte[] me)
me - the byte array that needs hexified.
public static void runClass(String classname,
String[] args)
throws Exception
Exception
public static void runClass(ClassLoader cl,
String classname,
String[] args)
throws Exception
Exceptionpublic static Boolean getBoolean(String s)
s - the string
public static String deHTML(String contents)
contents - the string whose HTML tags need removed.
public static void rmDashR(File tmp)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||