net.sf.fmj.apps.mediaserver
Class MediaHTTPD

java.lang.Object
  extended by fi.iki.elonen.nanohttpd.NanoHTTPD
      extended by net.sf.fmj.apps.mediaserver.MediaHTTPD

public class MediaHTTPD
extends NanoHTTPD

Author:
Ken Larson

Nested Class Summary
 
Nested classes/interfaces inherited from class fi.iki.elonen.nanohttpd.NanoHTTPD
NanoHTTPD.Response
 
Field Summary
 
Fields inherited from class fi.iki.elonen.nanohttpd.NanoHTTPD
HTTP_BADREQUEST, HTTP_FORBIDDEN, HTTP_INTERNALERROR, HTTP_NOTFOUND, HTTP_NOTIMPLEMENTED, HTTP_OK, HTTP_REDIRECT, MIME_DEFAULT_BINARY, MIME_HTML, MIME_PLAINTEXT, myFileDir
 
Constructor Summary
MediaHTTPD(int port)
           
 
Method Summary
 NanoHTTPD.Response serve(java.lang.String uri, java.lang.String method, java.util.Properties header, java.util.Properties parms)
          Override this to customize the server.
 
Methods inherited from class fi.iki.elonen.nanohttpd.NanoHTTPD
main, serveFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MediaHTTPD

public MediaHTTPD(int port)
           throws java.io.IOException
Throws:
java.io.IOException
Method Detail

serve

public NanoHTTPD.Response serve(java.lang.String uri,
                                java.lang.String method,
                                java.util.Properties header,
                                java.util.Properties parms)
Description copied from class: NanoHTTPD
Override this to customize the server.

(By default, this delegates to serveFile() and allows directory listing.)

Overrides:
serve in class NanoHTTPD
Parameters:
uri - Percent-decoded URI without parameters, for example "/index.cgi"
method - "GET", "POST" etc.
header - Header entries, percent decoded
parms - Parsed, percent decoded parameters from URI and, in case of POST, data.
Returns:
HTTP response, see class Response for details