Initial commit from SVN.

This commit is contained in:
wcrisman
2014-05-30 10:31:51 -07:00
commit b45e56b890
1968 changed files with 370949 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
/*
* Copyright (c) 1999,2006 Declarative Engineering LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Declarative Engineering LLC
* verson 1 which accompanies this distribution, and is available at
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
*/
package com.common.io;
import java.io.PrintWriter;
/*
* A print writer that simply wrappers a string buffer and whose string can be retreived by calling toString().
* This is useful for retrieving a stack trace using <code>exception.printStackTrace(PrintWriter)</code>.
*/
public class StringBufferPrintWriter extends PrintWriter {
/**
* StringBufferPrintWriter constructor.
* @param file
* @throws FileNotFoundException
*/
public StringBufferPrintWriter(StringBuffer buffer) {
super(new StringBufferWriter(buffer));
}//StringBufferPrintWriter()//
/**
* StringBufferPrintWriter constructor.
*/
public StringBufferPrintWriter() {
super(new StringBufferWriter(new StringBuffer(1000)));
}//StringBufferPrintWriter()//
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
public String toString() {
return ((StringBufferWriter) out).toString();
}//toString()//
}//StringBufferPrintWriter//