01: /*
02: * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/lib/TKStringPrintStream.java,v 1.5 2000/05/22 15:01:21 careck Exp $
03: *
04: */
05: package com.teamkonzept.lib;
06:
07: import java.io.*;
08:
09: /**
10: *
11: */
12: public class TKStringPrintStream extends PrintStream {
13:
14: protected ByteArrayOutputStream buffer;
15:
16: public TKStringPrintStream() {
17: this (new ByteArrayOutputStream());
18: }
19:
20: protected TKStringPrintStream(ByteArrayOutputStream buffer) {
21: super (buffer);
22: this .buffer = buffer;
23: }
24:
25: public ByteArrayOutputStream buffer() {
26: return buffer;
27: }
28:
29: public String toString() {
30: return buffer.toString();
31: }
32:
33: public void reset() {
34:
35: buffer.reset();
36: }
37: }
|