1 package com.sun.enterprise.util.diagnostics; 2 3 import java.io.*; 4 import java.util.*; 5 27 28 34 35 public class StackTrace 36 { 37 41 public StackTrace() 42 { 43 throwable = new Throwable (); 44 } 45 46 49 public StackTrace(Throwable t) 50 { 51 throwable = t; 52 } 53 54 58 public String toString() 59 { 60 ByteArrayOutputStream baos = new ByteArrayOutputStream(); 61 PrintWriter pw = new PrintWriter(baos); 62 63 throwable.printStackTrace(pw); 65 pw.flush(); 66 return baos.toString(); 67 } 68 69 71 Throwable throwable = null; 72 } 73 74 | Popular Tags |