The HttpOutputStream provides the convenience method
writeBytes for writing the byte representation of a
string, without bringing in the overhead and the deprecated warnings
associated with a java.io.DataOutputStream.
Generic http protocol stack, essential handlers and drivers.
This package consists of a small server side http protocol stack,
designed to be embedded in other applications. The design points are:
Extremely small footprint
Unlike a traditional webserver, designed primarily for serving
web documents, this protocol stack is bare-bones, providing only the
essentials for manipulating http requests and responses. It supports
HTTP/1.0, and the important features of HTTP/1.1.
Small, simple extension API.
The programming interface is designed for simplicity. There are
few convenience methods provided, and consequently no bias toward any
pre-conceived notions as to what http protocol stacks should be used for.
Classes that implement this API are called handlers, to distinguish
them from the moral equivalent, but more complex servlets used by
the Java Web Server.
Delegation based object model
Inheritance is used sparingly in favor of delegation. This alleviates
the need for base or abstract classes to know what the application
has in mind.
To ease the deployment and testing of applications that use the server,
two additional capabilities are included: a simple driver (main) program,
and a coupler of handler classes, so the protocol stack can be
used out of the box to provide a simple file service.