* @param exception the exception object.
* @return string containing the stack trace.
*/
public static String getStackTrace(Throwable exception)
{
StringBufferOutputStream strbuf = new StringBufferOutputStream();
exception.printStackTrace(new PrintStream(strbuf));
return strbuf.toString();
}