org.mortbay.jetty
Class Response
java.lang.Object
org.mortbay.jetty.Response
public class Response
- extends Object
Response.
Implements HttpServletResponse
from the javax.servlet
package.
- Author:
- gregw
DISABLED
public static final int DISABLED
- See Also:
- Constant Field Values
NONE
public static final int NONE
- See Also:
- Constant Field Values
STREAM
public static final int STREAM
- See Also:
- Constant Field Values
WRITER
public static final int WRITER
- See Also:
- Constant Field Values
Response
public Response(HttpConnection connection)
recycle
protected void recycle()
addCookie
public void addCookie(Cookie cookie)
containsHeader
public boolean containsHeader(String name)
encodeURL
public String encodeURL(String url)
encodeRedirectURL
public String encodeRedirectURL(String url)
encodeUrl
public String encodeUrl(String url)
encodeRedirectUrl
public String encodeRedirectUrl(String url)
sendError
public void sendError(int code,
String message)
throws IOException
- Throws:
IOException
sendError
public void sendError(int sc)
throws IOException
- Throws:
IOException
sendProcessing
public void sendProcessing()
throws IOException
- Throws:
IOException
sendRedirect
public void sendRedirect(String location)
throws IOException
- Throws:
IOException
setDateHeader
public void setDateHeader(String name,
long date)
addDateHeader
public void addDateHeader(String name,
long date)
setHeader
public void setHeader(String name,
String value)
getHeader
public String getHeader(String name)
getHeaders
public Enumeration getHeaders(String name)
addHeader
public void addHeader(String name,
String value)
setIntHeader
public void setIntHeader(String name,
int value)
addIntHeader
public void addIntHeader(String name,
int value)
setStatus
public void setStatus(int sc)
setStatus
public void setStatus(int sc,
String sm)
getCharacterEncoding
public String getCharacterEncoding()
getContentType
public String getContentType()
getOutputStream
public ServletOutputStream getOutputStream()
throws IOException
- Throws:
IOException
isWriting
public boolean isWriting()
getWriter
public PrintWriter getWriter()
throws IOException
- Throws:
IOException
setCharacterEncoding
public void setCharacterEncoding(String encoding)
setContentLength
public void setContentLength(int len)
setLongContentLength
public void setLongContentLength(long len)
setContentType
public void setContentType(String contentType)
setBufferSize
public void setBufferSize(int size)
getBufferSize
public int getBufferSize()
flushBuffer
public void flushBuffer()
throws IOException
- Throws:
IOException
reset
public void reset()
resetBuffer
public void resetBuffer()
isCommitted
public boolean isCommitted()
setLocale
public void setLocale(Locale locale)
getLocale
public Locale getLocale()
getStatus
public int getStatus()
- Returns:
- The HTTP status code that has been set for this request. This will be
200
(HttpServletResponse#SC_OK
), unless explicitly set through one of the setStatus
methods.
getReason
public String getReason()
- Returns:
- The reason associated with the current
status
. This will be null
,
unless one of the setStatus
methods have been called.
complete
public void complete()
throws IOException
- Throws:
IOException
getContentCount
public long getContentCount()
- Returns:
- the number of bytes actually written in response body
getHttpFields
public HttpFields getHttpFields()
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2007 Mort Bay Consulting. All Rights Reserved.