webcore.webserver
Class HTTPFileRetriever

java.lang.Object
  |
  +--webcore.webserver.HTTPFileRetriever
All Implemented Interfaces:
WebRequestable

public class HTTPFileRetriever
extends java.lang.Object
implements WebRequestable

WebRequestable to fulfill requests for static files. The file is read and returned to the client. The mimetype of the file is determined by extension using the MimeType class.

See Also:
MimeType

Field Summary
static java.lang.String defaultDoc
          the default page displayed
static java.lang.String notFoundDoc
          the page to display when the requested page cannot be found
 
Fields inherited from interface webcore.webserver.WebRequestable
htmlBaseHeader, htmlHeader, httpBaseHeader, httpHeader, submitjavascript, submitjavascripttag, textBaseHeader, textHeader
 
Constructor Summary
HTTPFileRetriever()
           
 
Method Summary
 void processRequest(HTTPRequest httpRequest)
          This method is called by the Webserver when the WebRequestable is requested by a client.
 void sendFile(java.net.Socket soc, java.lang.String fileStr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultDoc

public static java.lang.String defaultDoc
the default page displayed


notFoundDoc

public static java.lang.String notFoundDoc
the page to display when the requested page cannot be found

Constructor Detail

HTTPFileRetriever

public HTTPFileRetriever()
Method Detail

processRequest

public void processRequest(HTTPRequest httpRequest)
                    throws java.lang.Exception
Description copied from interface: WebRequestable
This method is called by the Webserver when the WebRequestable is requested by a client.

Specified by:
processRequest in interface WebRequestable
java.lang.Exception

sendFile

public void sendFile(java.net.Socket soc,
                     java.lang.String fileStr)
              throws java.io.IOException,
                     java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException