    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

##

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

##

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

##

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

##

DEFAULT_TYPE

     protected static HttpMimeType DEFAULT_TYPE

CONNECTION

     protected static HttpTokenList CONNECTION

is_proxy

     protected boolean is_proxy

  Is this reply a proxy reply.

filters

     protected HTTPFilter filters[]

infilters

     protected int infilters

output

     protected OutputStream output

chunkable

     protected Boolean chunkable

  Should this reply be chunked ?

chunked

     protected static String chunked[]

##

Reply

     public Reply(Client client)

  Create a new Reply instance for the given client.

  Parameters:
    client - The client to who this reply is directed.

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.

##

setStatus

     public void setStatus(Integer status)

hasContentLength

     public boolean hasContentLength()

hasContentType

     public boolean hasContentType()

setKeepAlive

     public void setKeepAlive(String value)

setProxyConnection

     public void setProxyConnection(String value)

keepProxyConnection

     public boolean keepProxyConnection()

getInputFileDescriptor

     public FileDescriptor getInputFileDescriptor()

  Note: getInputFileDescriptor() is deprecated.

setKeepConnection

     public void setKeepConnection(boolean onoff)

tryKeepConnection

     public boolean tryKeepConnection()

setProxy

     public void setProxy(boolean onoff)

  Mark this reply as being a proxy reply.

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.

hasStream

     public boolean hasStream()

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.

setStream

     public void setStream(InputStream is)

setFilters

     protected void setFilters(HTTPFilter filters[],
                               int infilters)

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.

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.

canChunkTransfer

     public boolean canChunkTransfer()

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