import java.io.IOException;
import java.io.StringWriter;
import java.util.Vector;
public class HtmlUtils {
public String createHtmlHeader(String title) {
String htmlHeader = null;
htmlHeader = " " + title + " ";
return htmlHeader;
}
public String getHtmlFooter() {
String htmlFooter = "";
return htmlFooter;
}
public String getHead(int level, String heading) {
return " " + heading + " ";
}
public String getTableHead(String align, int border) {
String tableHeader = null;
tableHeader = "";
return tableHeader;
}
public String getTR(String align) {
String TRCell = null;
TRCell = "";
return TRCell;
}
public String getTR() {
String TRCell = null;
TRCell = " ";
return TRCell;
}
public String getTD(String align, String value) {
String TDCell = null;
TDCell = " " + value + " ";
return TDCell;
}
public String getTD() {
String TDCell = null;
TDCell = "";
return TDCell;
}
public String getTD(int width) {
String TDCell = null;
TDCell = " ";
return TDCell;
}
public String getTH(String align, String value) {
String THCell = null;
THCell = " " + value + " ";
return THCell;
}
public String getTableContents(String align, Vector values,
int elementCounter) throws IOException {
StringWriter Cells = new StringWriter();
String contents = new String();
int vsize = values.size();
Cells.write(" ");
for (int i = 0; i < vsize; i++) {
String value = values.elementAt(i).toString();
if (i != 0) {
if (i >= elementCounter) {
if (i % elementCounter == 0) {
Cells.write(" \n\n");
}
}
}
Cells.write(" " + value + " \n");
}
Cells.write(" ");
contents = Cells.toString();
Cells.flush();
Cells.close();
return contents;
}
public String getClosedTR() {
String TRCell = null;
TRCell = "";
return TRCell;
}
public String getClosedTD() {
String TDCell = null;
TDCell = "";
return TDCell;
}
public String getBR(int lines) {
StringWriter lineBR = new StringWriter();
String lineBRs = new String();
for (int i = 0; i <= lines; i++) {
lineBR.write("
\n");
}
lineBRs = lineBR.toString();
return lineBRs;
}
public String getLI(String item) {
String li = new String("");
li += item;
return li;
}
}