|
||||||||||
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(java.io.OutputStream os,
java.io.InputStream is)
Constructs a BasicHttpServer that communicates over an input and output stream. |
|
BasicHttpServer(java.net.Socket socket)
Constructs a BasicHttpServer that communicates over a socket. |
Method Summary | |
---|---|
void |
close()
Closes the underlying input and output streams. |
java.io.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. |
java.lang.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(java.net.Socket socket) throws java.io.IOException
java.io.IOException
public BasicHttpServer(java.io.OutputStream os, java.io.InputStream is)
Method Detail |
---|
public ServerRequest readRequest() throws java.io.IOException
HttpServer
Request
information.
readRequest
in interface HttpServer
java.io.IOException
public void writeResponse(ServerResponse response) throws java.io.IOException
HttpServer
writeResponse
in interface HttpServer
HttpException
- if the server returned an invalid HTTP
response
java.io.IOException
public java.io.OutputStream getOutputStream()
HttpServer
getOutputStream
in interface HttpServer
public void close() throws java.io.IOException
close
in interface HttpServer
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |