FileDocCategorySizeDatePackage
IOBean.javaAPI DocGlassfish v2 API2931Sat May 05 19:17:12 BST 2007org.apache.taglibs.standard.examples.util

IOBean

public class IOBean extends Object

String repository for Reader/Writer.

author
Pierre Delisle
version
$Revision: 1.3 $ $Date: 2007/05/06 02:17:12 $

Fields Summary
StringWriter
stringWriter
String
content
Constructors Summary
Methods Summary
public java.io.ReadergetReader()


         
	//p("getReader()");
	if (content == null) {
	    if (stringWriter == null) {
		throw new JspException(
		    "content must first be added to the bean via the writer");
	    }
	    content = stringWriter.toString();
	}
	return new StringReader(content);
    
public java.io.WritergetWriter()

	//p("getWriter()");
	content = null;
	stringWriter = new StringWriter();
	return stringWriter;
    
private voidp(java.lang.String s)

	System.out.println("[IOBean] " + s);
    
public voidrelease()

	stringWriter = null;
	content = null;