class StringUtilities {

    public static String convertToHTMLTable(String text)
    {
        if (text == null)
        {
            return text;
        }

        final StringBuilder newText = new StringBuilder(text.length());

        newText.append("<html><table>");
        newText.append(text.replaceAll("([^\t\n\r]+)\t*", "<td>$1</td>").replaceAll("([^\n\r]+)[\n\r]*", "<tr>$1</tr>"));
        newText.append("</table></html>");

        return newText.toString();
    }

    private  StringUtilities();

}