sb.append("</tr>");
sb.append("</li>");
    public static String list(File file) {        StringBuffer sb = new StringBuffer();        sb.append("<html>");        sb.append("<head>");        sb.append("<title>Directory listing of ");        sb.append(file.getPath());        sb.append("</title>");        sb.append("<style>");        sb.append("table { background-color: #ddffdd; }");        sb.append(".dir { font-weight: bold; color: #ff9966; }");        sb.append(".file { font-weight: normal; color: #003333; }");        sb.append("</style>");        sb.append("</head>");        sb.append("<body>");        sb.append("<p>the file ");        sb.append(file.toString());        sb.append(" is</p>");        if (file.isDirectory()) {            sb.append("<table>");            File[] files = file.listFiles();            for (int i = 0; i < files.length; i++) {                sb.append("<tr>");                if (files[i].isDirectory()) {                    sb.append("<td class='dir'>" + files[i].getName() + "</td>");                } else {                    sb.append("<td class='file'>" + files[i].getName() + "</td>");                }                sb.append("</tr>");            }            sb.append("</table>");        }        return sb.toString();    }