String[] names = file.list();
if (names == null) {
res.sendError(HttpServletResponse.SC_FORBIDDEN, "Can't access " + req.getRequestURI());
return;
}
PrintStream p = new PrintStream(new BufferedOutputStream(out), false, charSet); // 1.4
p.println("<HTML><HEAD>");
p.println("<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=" + charSet + "\">");
p.println("<TITLE>Index of " + path + "</TITLE>");
p.println("</HEAD><BODY " + Serve.BGCOLOR);
p.println("><H2>Index of " + path + "</H2>");