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
-
characterEncoding
-
-
committed
-
-
contentLanguage
-
-
contentLength
-
-
contentType
-
-
headers
-
-
out
-
-
request
-
-
responseFacade
-
-
sessionId
-
-
sm
-
-
started
-
-
status
-
-
userCookies
-
-
usingStream
-
-
usingWriter
-
-
writer
-
-
ResponseImpl()
-
-
addCookie(Cookie)
-
-
addHeader(String, String)
-
-
containsHeader(String)
-
-
doWrite(byte[], int, int)
- Write a chunk of bytes.
-
endHeaders()
- Signal that we're done with the headers, and body will follow.
-
finish()
-
-
flushBuffer()
-
-
getBody()
-
-
getBufferSize()
-
-
getCharacterEncoding()
-
-
getContentLength()
-
-
getContentType()
-
-
getCookies()
-
-
getFacade()
-
-
getLocale()
-
-
getMessage(int)
-
-
getOutputStream()
- Either implement ServletOutputStream or return BufferedServletOutputStream(this)
and implement doWrite();
-
getRequest()
-
-
getSessionId()
-
-
getStatus()
-
-
getWriter()
-
-
isBufferCommitted()
-
-
isIncluded()
-
-
isStarted()
-
-
isUsingStream()
-
-
recycle()
-
-
reset()
-
-
setBufferSize(int)
-
-
setContentLength(int)
-
-
setContentType(String)
-
-
setHeader(String, String)
-
-
setIncluded(boolean)
-
-
setLocale(Locale)
-
-
setRequest(Request)
-
-
setSessionId(String)
-
-
setStatus(int)
- Set the response status
sm
protected static StringManager sm
request
protected Request request
responseFacade
protected HttpServletResponseFacade responseFacade
userCookies
protected Vector userCookies
contentType
protected String contentType
contentLanguage
protected String contentLanguage
characterEncoding
protected String characterEncoding
sessionId
protected String sessionId
contentLength
protected int contentLength
status
protected int status
headers
protected MimeHeaders headers
out
protected BufferedServletOutputStream out
writer
protected PrintWriter writer
usingStream
protected boolean usingStream
usingWriter
protected boolean usingWriter
started
protected boolean started
committed
protected boolean committed
ResponseImpl
public ResponseImpl()
getFacade
public HttpServletResponseFacade getFacade()
setRequest
public void setRequest(Request request)
getRequest
public Request getRequest()
isIncluded
public boolean isIncluded()
setIncluded
public void setIncluded(boolean incl)
isStarted
public boolean isStarted()
recycle
public void recycle()
finish
public void finish() throws IOException
containsHeader
public boolean containsHeader(String name)
isUsingStream
public boolean isUsingStream()
getWriter
public PrintWriter getWriter() throws IOException
setHeader
public void setHeader(String name,
String value)
addHeader
public void addHeader(String name,
String value)
getBufferSize
public int getBufferSize()
setBufferSize
public void setBufferSize(int size) throws IllegalStateException
isBufferCommitted
public boolean isBufferCommitted()
reset
public void reset() throws IllegalStateException
flushBuffer
public void flushBuffer() throws IOException
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.
addCookie
public void addCookie(Cookie cookie)
getCookies
public Enumeration getCookies()
setSessionId
public void setSessionId(String id)
getSessionId
public String getSessionId()
getLocale
public Locale getLocale()
setLocale
public void setLocale(Locale locale)
getCharacterEncoding
public String getCharacterEncoding()
setContentType
public void setContentType(String contentType)
getContentType
public String getContentType()
setContentLength
public void setContentLength(int contentLength)
getContentLength
public int getContentLength()
getStatus
public int getStatus()
setStatus
public void setStatus(int status)
- Set the response status
getOutputStream
public ServletOutputStream getOutputStream()
- Either implement ServletOutputStream or return BufferedServletOutputStream(this)
and implement doWrite();
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.
getBody
public StringBuffer getBody()
getMessage
public static String getMessage(int status)
All Packages Class Hierarchy This Package Previous Next Index