All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.apache.tomcat.core.ResponseImpl

java.lang.Object
   |
   +----org.apache.tomcat.core.ResponseImpl

public class ResponseImpl
extends Object
implements Response
Author:
James Duncan Davidson [duncan@eng.sun.com], Jason Hunter [jch@eng.sun.com], James Todd [gonzo@eng.sun.com], Harish Prabandham, Hans Bergsten

Variable Index

 o characterEncoding
 o committed
 o contentLanguage
 o contentLength
 o contentType
 o headers
 o out
 o request
 o responseFacade
 o sessionId
 o sm
 o started
 o status
 o userCookies
 o usingStream
 o usingWriter
 o writer

Constructor Index

 o ResponseImpl()

Method Index

 o addCookie(Cookie)
 o addHeader(String, String)
 o containsHeader(String)
 o doWrite(byte[], int, int)
Write a chunk of bytes.
 o endHeaders()
Signal that we're done with the headers, and body will follow.
 o finish()
 o flushBuffer()
 o getBody()
 o getBufferSize()
 o getCharacterEncoding()
 o getContentLength()
 o getContentType()
 o getCookies()
 o getFacade()
 o getLocale()
 o getMessage(int)
 o getOutputStream()
Either implement ServletOutputStream or return BufferedServletOutputStream(this) and implement doWrite();
 o getRequest()
 o getSessionId()
 o getStatus()
 o getWriter()
 o isBufferCommitted()
 o isIncluded()
 o isStarted()
 o isUsingStream()
 o recycle()
 o reset()
 o setBufferSize(int)
 o setContentLength(int)
 o setContentType(String)
 o setHeader(String, String)
 o setIncluded(boolean)
 o setLocale(Locale)
 o setRequest(Request)
 o setSessionId(String)
 o setStatus(int)
Set the response status

Variables

 o sm
 protected static StringManager sm
 o request
 protected Request request
 o responseFacade
 protected HttpServletResponseFacade responseFacade
 o userCookies
 protected Vector userCookies
 o contentType
 protected String contentType
 o contentLanguage
 protected String contentLanguage
 o characterEncoding
 protected String characterEncoding
 o sessionId
 protected String sessionId
 o contentLength
 protected int contentLength
 o status
 protected int status
 o headers
 protected MimeHeaders headers
 o out
 protected BufferedServletOutputStream out
 o writer
 protected PrintWriter writer
 o usingStream
 protected boolean usingStream
 o usingWriter
 protected boolean usingWriter
 o started
 protected boolean started
 o committed
 protected boolean committed

Constructors

 o ResponseImpl
 public ResponseImpl()

Methods

 o getFacade
 public HttpServletResponseFacade getFacade()
 o setRequest
 public void setRequest(Request request)
 o getRequest
 public Request getRequest()
 o isIncluded
 public boolean isIncluded()
 o setIncluded
 public void setIncluded(boolean incl)
 o isStarted
 public boolean isStarted()
 o recycle
 public void recycle()
 o finish
 public void finish() throws IOException
 o containsHeader
 public boolean containsHeader(String name)
 o isUsingStream
 public boolean isUsingStream()
 o getWriter
 public PrintWriter getWriter() throws IOException
 o setHeader
 public void setHeader(String name,
                       String value)
 o addHeader
 public void addHeader(String name,
                       String value)
 o getBufferSize
 public int getBufferSize()
 o setBufferSize
 public void setBufferSize(int size) throws IllegalStateException
 o isBufferCommitted
 public boolean isBufferCommitted()
 o reset
 public void reset() throws IllegalStateException
 o flushBuffer
 public void flushBuffer() throws IOException
 o endHeaders
 public void endHeaders() throws IOException
Signal that we're done with the headers, and body will follow. Any implementation needs to notify ContextManager, to allow interceptors to fix headers.

 o addCookie
 public void addCookie(Cookie cookie)
 o getCookies
 public Enumeration getCookies()
 o setSessionId
 public void setSessionId(String id)
 o getSessionId
 public String getSessionId()
 o getLocale
 public Locale getLocale()
 o setLocale
 public void setLocale(Locale locale)
 o getCharacterEncoding
 public String getCharacterEncoding()
 o setContentType
 public void setContentType(String contentType)
 o getContentType
 public String getContentType()
 o setContentLength
 public void setContentLength(int contentLength)
 o getContentLength
 public int getContentLength()
 o getStatus
 public int getStatus()
 o setStatus
 public void setStatus(int status)
Set the response status

 o getOutputStream
 public ServletOutputStream getOutputStream()
Either implement ServletOutputStream or return BufferedServletOutputStream(this) and implement doWrite();

 o doWrite
 public void doWrite(byte buffer[],
                     int pos,
                     int count) throws IOException
Write a chunk of bytes. Should be called only from ServletOutputStream implementations, No need to implement it if your adapter implements ServletOutputStream. Headers and status will be written before this method is exceuted.

 o getBody
 public StringBuffer getBody()
 o getMessage
 public static String getMessage(int status)

All Packages  Class Hierarchy  This Package  Previous  Next  Index