|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.noderunner.http.BasicHttpServer
public class BasicHttpServer
A very basic HTTP server implementation.
BasicHttpClient
Constructor Summary | |
---|---|
BasicHttpServer(OutputStream os,
InputStream is)
Constructs a BasicHttpServer that communicates over an input and output stream. |
|
BasicHttpServer(Socket socket)
Constructs a BasicHttpServer that communicates over a socket. |
Method Summary | |
---|---|
void |
close()
Closes the underlying input and output streams. |
OutputStream |
getOutputStream()
Returns a stream for writing data to, if data is to be sent to the client. |
ServerRequest |
readRequest()
Reads the HTTP Request information. |
String |
toString()
Returns debug information. |
void |
writeResponse(ServerResponse response)
Sends response data to the HTTP client. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BasicHttpServer(Socket socket) throws IOException
IOException
public BasicHttpServer(OutputStream os, InputStream is)
Method Detail |
---|
public ServerRequest readRequest() throws IOException
HttpServer
Request
information.
readRequest
in interface HttpServer
IOException
public void writeResponse(ServerResponse response) throws IOException
HttpServer
writeResponse
in interface HttpServer
HttpException
- if the server returned an invalid HTTP
response
IOException
public OutputStream getOutputStream()
HttpServer
getOutputStream
in interface HttpServer
public void close() throws IOException
close
in interface HttpServer
IOException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |