All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.http.Reply

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

public class Reply
extends HttpReplyMessage

Variable Index

 o chunkable
Should this reply be chunked ?
 o chunked
 o CONNECTION
 o DEFAULT_TYPE
 o filters
 o infilters
 o is_proxy
Is this reply a proxy reply.
 o output

Constructor Index

 o Reply(Client)
Create a new Reply instance for the given client.
 o Reply(Client, Request, short, short, int)
Create a new reply for the given client.

Method Index

 o canChunkTransfer()
 o getInputFileDescriptor()
Deprecated.
 o getOutputStream()
Get that reply output stream.
 o getOutputStream(boolean)
Get the reply output stream.
 o hasContentLength()
 o hasContentType()
 o hasStream()
 o keepProxyConnection()
 o openStream()
Open this reply body stream.
 o setContent(String)
Set this reply content.
 o setFilters(HTTPFilter[], int)
 o setKeepAlive(String)
 o setKeepConnection(boolean)
 o setProxy(boolean)
Mark this reply as being a proxy reply.
 o setProxyConnection(String)
 o setStatus(Integer)
 o setStream(HtmlGenerator)
Sets the reply stream to the given HtmlGenerator stream.
 o setStream(InputStream)
 o tryKeepConnection()

Variables

 o DEFAULT_TYPE
 protected static HttpMimeType DEFAULT_TYPE
 o CONNECTION
 protected static HttpTokenList CONNECTION
 o is_proxy
 protected boolean is_proxy
Is this reply a proxy reply.

 o filters
 protected HTTPFilter filters[]
 o infilters
 protected int infilters
 o output
 protected OutputStream output
 o chunkable
 protected Boolean chunkable
Should this reply be chunked ?

 o chunked
 protected static String chunked[]

Constructors

 o Reply
 public Reply(Client client)
Create a new Reply instance for the given client.

Parameters:
client - The client to who this reply is directed.
 o Reply
 public Reply(Client client,
              Request request,
              short major,
              short minor,
              int status)
Create a new reply for the given client.

Parameters:
client - The client ot who the reply is directed.

Methods

 o setStatus
 public void setStatus(Integer status)
 o hasContentLength
 public boolean hasContentLength()
 o hasContentType
 public boolean hasContentType()
 o setKeepAlive
 public void setKeepAlive(String value)
 o setProxyConnection
 public void setProxyConnection(String value)
 o keepProxyConnection
 public boolean keepProxyConnection()
 o getInputFileDescriptor
 public FileDescriptor getInputFileDescriptor()
Note: getInputFileDescriptor() is deprecated.

 o setKeepConnection
 public void setKeepConnection(boolean onoff)
 o tryKeepConnection
 public boolean tryKeepConnection()
 o setProxy
 public void setProxy(boolean onoff)
Mark this reply as being a proxy reply.

 o setStream
 public void setStream(HtmlGenerator g)
Sets the reply stream to the given HtmlGenerator stream.

Parameters:
g - The HtmlGenerator whose output is to be used as the reply body.
 o hasStream
 public boolean hasStream()
 o openStream
 public InputStream openStream()
Open this reply body stream. This is used to send the reply body back to the client.

Returns:
An InputStream containing the reply body, which is dumped back to the client.
 o setStream
 public void setStream(InputStream is)
 o setFilters
 protected void setFilters(HTTPFilter filters[],
                           int infilters)
 o getOutputStream
 public synchronized OutputStream getOutputStream(boolean doEmit) throws IOException
Get the reply output stream.

Parameters:
doEmit - Emit that reply before giving out the output stream.
Returns:
An OutputStream instance.
Throws: IOException
If the output stream could not get opened.
 o getOutputStream
 public OutputStream getOutputStream() throws IOException
Get that reply output stream. The reply is first emitted to the stream, and the opened stream is returned back to the caller.

Returns:
An OutputStream instance.
Throws: IOException
If the output stream could not get opened.
 o canChunkTransfer
 public boolean canChunkTransfer()
 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