org.webbitserver.handler
Class DefaultDirectoryListingFormatter

java.lang.Object
  extended by org.webbitserver.handler.DefaultDirectoryListingFormatter
All Implemented Interfaces:
DirectoryListingFormatter

public class DefaultDirectoryListingFormatter
extends Object
implements DirectoryListingFormatter


Constructor Summary
DefaultDirectoryListingFormatter()
           
 
Method Summary
 byte[] formatFileListAsHtml(Iterable<FileEntry> files)
          Formats a list of files for display as a full well-formed HTML page.
protected  String getDirectoryListingFormatString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDirectoryListingFormatter

public DefaultDirectoryListingFormatter()
Method Detail

formatFileListAsHtml

public byte[] formatFileListAsHtml(Iterable<FileEntry> files)
                            throws IOException
Description copied from interface: DirectoryListingFormatter
Formats a list of files for display as a full well-formed HTML page. Must escape any unsafe file names or other data being returned.

Specified by:
formatFileListAsHtml in interface DirectoryListingFormatter
Parameters:
files - A list of files about which information (e.g. file names) is to be presented.
Returns:
A ByteBuffer containing an entire HTML page to display, presenting information about files.
Throws:
IOException

getDirectoryListingFormatString

protected String getDirectoryListingFormatString()


Copyright © 2013. All Rights Reserved.