1 package com.jbidwatcher.util.html; 2 /* 3 * Copyright (c) 2000-2007, CyberFOX Software, Inc. All Rights Reserved. 4 * 5 * Developed by mrs (Morgan Schweers) 6 */ 7 8 /*!@class JHTMLOutput 9 * 10 * @brief Dump a stringbuffer out, surrounded by appropriate HTML tags. 11 * 12 */ 13 14 public class JHTMLOutput { 15 private static final int FOURK = 4096; 16 private StringBuffer _page = new StringBuffer(FOURK); 17 JHTMLOutput(String title, String body)18 public JHTMLOutput(String title, String body) { 19 buildPage(title, new StringBuffer(body)); 20 } 21 JHTMLOutput(String title, StringBuffer body)22 public JHTMLOutput(String title, StringBuffer body) { 23 buildPage(title, body); 24 } 25 buildPage(String title, StringBuffer body)26 private void buildPage(String title, StringBuffer body) { 27 _page.append("<HTML><HEAD><TITLE>"); 28 _page.append(title); 29 _page.append("</TITLE></HEAD>\n"); 30 _page.append("<BODY>\n"); 31 _page.append(body.toString()); 32 _page.append("</BODY>\n</HTML>\n"); 33 } 34 getStringBuffer()35 public StringBuffer getStringBuffer() { return _page; } 36 } 37