df = new SimpleDateFormat ("yyyy MMM dd - HH:mm:ss zzz");
df.setTimeZone(TimeZone.getTimeZone("GMT"));
StringBuffer buffer = new StringBuffer(100);
try {
FramedResource resource = (FramedResource) rr.lock();
if (name == null)
name = resource.getIdentifier();
if (even) {
buffer.append("<tr class=\"evenlist\" align=\"left\" "
+ "valign=\"bottom\">");
} else {
buffer.append("<tr class=\"oddlist\" align=\"left\" "
+ "valign=\"bottom\">");
}
HTTPFrame itsframe = null;
if (httpClass != null)
itsframe = (HTTPFrame)resource.getFrame(httpClass);
if (itsframe instanceof CvsFrame) {
buffer.append("<td></td>");
} else {
buffer.append("<td>");
buffer.append("<INPUT TYPE=\"CHECKBOX\" NAME=\"" + name
+ "\"> ");
buffer.append("</td>");
}
buffer.append("<td>");
if (itsframe != null) {
String icon = itsframe.getIcon() ;
if ( icon != null )
buffer.append("<IMG SRC=\""+
getIconDirectory() +"/" + icon+
"\">");
// Resource's name with link:
buffer.append("<A HREF=\""+resource.getURLPath()+
"\">"+name+"</A>");
// resource's title, if any:
String title = itsframe.getTitle();
if (title != null) {
buffer.append("</td><td>"+title);
} else {
buffer.append("</td><td>");
}
int clength = itsframe.getContentLength();
if (clength != -1) {
int kcl = clength / 1024;
buffer.append("</td><td>[ " + kcl + " kB ]");
} else {
buffer.append("</td><td>-");
}
long clm = itsframe.getLastModified();
if (clm != -1) {
buffer.append("</td><td>"+ df.format(new Date(clm)));
} else {
buffer.append("</td><td>-");
}
} else {
// Resource's name with link:
buffer.append("<A HREF=\""+resource.getURLPath()+
"\">"+name+"</A>"+" Not available via HTTP");
buffer.append("</td><td></td><td></td><td>\n");
}
buffer.append("</td></tr>\n");
} catch (InvalidResourceException ex) {