com.dalsemi.tininet.http
Class HTTPWorker

java.lang.Object
  |
  +--com.dalsemi.tininet.http.HTTPWorker

public class HTTPWorker
extends java.lang.Object
implements java.lang.Runnable

HTTPWorker thread class This worker class is primarily used by HTTPServer to handle requests It handles parseing and URL encoding, decoding etc.


Method Summary
 byte[] encodeBody(int statusCode, java.lang.String body, java.lang.String contentType, int size)
          Encodes the body into a byte array.
 byte[] encodeContentType(java.lang.String contentType, int size)
          Encodes the content type into a byte array.
 void run()
          Entry point for this worker thread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encodeContentType

public byte[] encodeContentType(java.lang.String contentType,
                                int size)
Encodes the content type into a byte array.
Parameters:
contentType - string representing the content type.
size - size of the content type string.
Returns:
returns the byte encoded buffer

encodeBody

public byte[] encodeBody(int statusCode,
                         java.lang.String body,
                         java.lang.String contentType,
                         int size)
Encodes the body into a byte array.
Parameters:
body - string representing the body.
size - size of the body string.
Returns:
returns the byte encoded buffer

run

public void run()
Entry point for this worker thread
Specified by:
run in interface java.lang.Runnable


Also see:
o TINI 1.16 API
o TINI Home Page
o 1-Wire API

o JDK 1.1

Last update Wed Jun 8 17:19:36 CDT 2005