Class JPEGHTTPServer

java.lang.Object
  extended byJPEGHTTPServer

public class JPEGHTTPServer
extends java.lang.Object

Itsy bitsy teeny weeny web server. Always returns an image, regardless of the requested file name.


Constructor Summary
JPEGHTTPServer(int port, AbstractJPEGStream cam)
           
 
Method Summary
 void handleRequests()
          This method handles client requests.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPEGHTTPServer

public JPEGHTTPServer(int port,
                      AbstractJPEGStream cam)
Parameters:
port - The TCP port the server should listen to
cam - The camera used to provide JPEG images
Method Detail

handleRequests

public void handleRequests()
                    throws java.io.IOException
This method handles client requests. Runs in an eternal loop that does the following: Two simple help methods (getLine/putLine) are used to read/write entire text lines from/to streams. Their implementations follow below.

Throws:
java.io.IOException