|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.portlet.model.ResponseData
public class ResponseData
Stores the response data.
| Constructor Summary | |
|---|---|
ResponseData()
|
|
| Method Summary | |
|---|---|
void |
addCookie(javax.servlet.http.Cookie cookie)
Adds a cookie. |
void |
addHeader(String name,
String value)
Adds a new value to an HTTP response header. |
boolean |
containsHeader(String name)
|
String |
getCharacterEncoding()
|
int |
getContentLength()
|
String |
getContentType()
|
List<javax.servlet.http.Cookie> |
getCookies()
|
int |
getErrorCode()
|
String |
getErrorMessage()
|
Map<String,List<String>> |
getHeaders()
|
Locale |
getLocale()
|
String |
getMimeType()
|
javax.servlet.ServletOutputStream |
getOutputStream()
|
Reader |
getReader()
|
String |
getRedirect()
|
int |
getStatusCode()
|
String |
getStatusMessage()
|
PrintWriter |
getWriter()
|
void |
sendError(int code,
String message)
Specifies that the request could not be fulfilled. |
void |
sendRedirect(String location)
Specifies that the request must be redirected. |
void |
setCharacterEncoding(String charset)
Sets the character encoding. |
void |
setContentLength(int len)
Sets the content length. |
void |
setContentType(String type)
Sets the content type. |
void |
setHeader(String name,
String value)
Overwrite all the values associated with an HTTP response header. |
void |
setLocale(Locale loc)
Sets the locale. |
void |
setStatus(int code,
String message)
Sets the response status. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResponseData()
| Method Detail |
|---|
public void addCookie(javax.servlet.http.Cookie cookie)
cookie - the cookie to be addedpublic List<javax.servlet.http.Cookie> getCookies()
public void addHeader(String name,
String value)
name - the header namevalue - the value to addpublic Map<String,List<String>> getHeaders()
public boolean containsHeader(String name)
name - the header name
true if the specified header was set, false otherwisepublic String getCharacterEncoding()
public String getContentType()
public String getMimeType()
public int getContentLength()
public Locale getLocale()
public javax.servlet.ServletOutputStream getOutputStream()
throws IOException
IOException - if the output stream is not accessible
public PrintWriter getWriter()
throws IOException
IOException - if the writer is not accessiblepublic void setCharacterEncoding(String charset)
charset - the new character encodingpublic void setContentLength(int len)
len - the content lengthpublic void setContentType(String type)
type - the new content type
public void setHeader(String name,
String value)
name - the header namevalue - the new valuepublic void setLocale(Locale loc)
loc - the new localepublic void sendRedirect(String location)
location - the location where to redirect the requestpublic String getRedirect()
public void sendError(int code,
String message)
code - the error codemessage - the error messagepublic int getErrorCode()
public String getErrorMessage()
public void setStatus(int code,
String message)
code - the status codemessage - the status messagepublic int getStatusCode()
public String getStatusMessage()
public Reader getReader()
throws UnsupportedEncodingException
getWriter() or the output stream returned by getOutputStream()
UnsupportedEncodingException - if the encoding returned by getCharacterEncoding() is unsupported
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||