1 17 18 package org.apache.tomcat.util.log; 19 20 import java.io.ByteArrayOutputStream ; 21 import java.io.PrintStream ; 22 23 28 29 class CaptureLog { 30 31 protected CaptureLog() { 32 baos = new ByteArrayOutputStream (); 33 ps = new PrintStream (baos); 34 } 35 36 private ByteArrayOutputStream baos; 37 private PrintStream ps; 38 39 protected PrintStream getStream() { 40 return ps; 41 } 42 43 protected void reset() { 44 baos.reset(); 45 } 46 47 protected String getCapture() { 48 return baos.toString(); 49 } 50 } 51 | Popular Tags |