From 171d615a9fbfbab688e8e20cc2255b4b309d4eea Mon Sep 17 00:00:00 2001 From: hns Date: Tue, 31 Jul 2001 23:58:28 +0000 Subject: [PATCH] added utility writeln() function that appends a "
" to everything. I know it's not XML, but it's handy for debugging. --- src/helma/framework/ResponseTrans.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/helma/framework/ResponseTrans.java b/src/helma/framework/ResponseTrans.java index b56291db..494f3c06 100644 --- a/src/helma/framework/ResponseTrans.java +++ b/src/helma/framework/ResponseTrans.java @@ -98,6 +98,17 @@ public class ResponseTrans implements Externalizable { } } + /** + * Utility function that appends a
to whatever is written + */ + public void writeln (Object what) { + if (buffer == null) + buffer = new StringBuffer (512); + if (what != null) + buffer.append (what.toString ()); + buffer.append ("
\r\n"); + } + /** * Replace special characters with entities, including <, > and ", thus allowing * no HTML tags.