All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.www.protocol.http.Reply

java.lang.Object
   |
   +----w3c.www.http.HttpMessage
           |
           +----w3c.www.http.HttpEntityMessage
                   |
                   +----w3c.www.http.HttpReplyMessage
                           |
                           +----w3c.www.protocol.http.Reply

public class Reply
extends HttpReplyMessage

Variable Index

 o DEFAULT_TYPE
 o definesInput
 o input

Method Index

 o getInputStream()
Get this reply entity body.
 o hasInputStream()
Does this reply has an associated entity stream ?
 o keepsAlive()
 o matchesRequest(Request)
Notify this reply that is has been built to answer given request.
 o setContent(String)
Set this reply content.
 o setStream(InputStream)
Set this reply's input stream.
 o setStreamObserver(HttpStreamObserver)
Set an stream observer on the repkly entity stream.

Variables

 o DEFAULT_TYPE
 protected static HttpMimeType DEFAULT_TYPE
 o input
 protected InputStream input
 o definesInput
 protected boolean definesInput

Methods

 o keepsAlive
 public boolean keepsAlive()
 o setStreamObserver
 protected void setStreamObserver(HttpStreamObserver observer)
Set an stream observer on the repkly entity stream. This method should be called before any caller gets a chance to execute getInputStream. It is needed for HttpServer instances to be notified when the stream becomes available for the next request.

 o matchesRequest
 protected void matchesRequest(Request request)
Notify this reply that is has been built to answer given request. Perform has many ugly hack HTTP/1.1 requires.

Parameters:
request - The request that is answered by this reply.
 o setStream
 public void setStream(InputStream input)
Set this reply's input stream.

Parameters:
input - The stream to read the reply's entity from.
 o getInputStream
 public InputStream getInputStream() throws IOException
Get this reply entity body. The reply entity body is returned as an InputStream, that the caller has to read to actually get the bytes of the content.

Returns:
An InputStream instance. If the reply has no body, the returned input stream will just return -1 on first read.
 o hasInputStream
 public boolean hasInputStream() throws IOException
Does this reply has an associated entity stream ?

Returns:
A boolean, true if the reply has an entity stream, false otherwise.
 o setContent
 public void setContent(String msg)
Set this reply content. This method allows to set the reply content to a simple String instance.

Parameters:
msg - The reply content.

All Packages  Class Hierarchy  This Package  Previous  Next  Index