John Chamberlain
Java Toolchest
 String Utilities
reverse - reverses a string
right - returns the right n-characters from a string with no chance of error
find - finds a string in a string buffer
split - divides a string into an array using a delimiter; similar to Java 1.4 split
replace - replace one string with another
sFixedWidth - formats a string at a fixed width with padding and alignment
sRepeatChar - Creates a string by repeating a character
sSafeSubstring - Gets a substring of a particular length from a buffer with no chance of error.
 Numbers and Numeric Formatting
is(Type) - determines whether a String is a number of a particular type
toHex - Formats a number as upper-case hex at a fixed with (requires sFixedWidth)
 Sorting and Searching
sortFiles - quick sorts files by file name
 Errors and Debugging
extractStackTrace - turns a stack trace into a String
sDumpMatrix - prints the content of an array of doubles
 File Utilities
getExtension - gets the extension from a file name or path
File Load - loads a file or string resource into a StringBuffer
File Save - saves a StringBuffer to a file
Fetch Http - gets a web site and returns it as a string
Friendly File Name - Removes objectionable characters from a title so it can be used as a file name
sConnectPaths - Takes two path fragments and puts them together making sure only a single slash separates them
 Graphics
drawArrow - draws an arrow
Java Toolchest · info@johnchamberlain.com · Revised 25 November 2003