org.apache.wicket.protocol.http
Class BufferedWebResponse
java.lang.Object
org.apache.wicket.request.Response
org.apache.wicket.request.http.WebResponse
org.apache.wicket.protocol.http.BufferedWebResponse
- All Implemented Interfaces:
- IMetaDataBufferingWebResponse
public class BufferedWebResponse
- extends WebResponse
- implements IMetaDataBufferingWebResponse
Subclass of WebResponse
that buffers the actions and performs those on another response.
- Author:
- Matej Knopp
- See Also:
writeTo(WebResponse)
BufferedWebResponse
public BufferedWebResponse(WebResponse originalResponse)
- Construct.
- Parameters:
originalResponse
-
writeMetaData
public void writeMetaData(WebResponse response)
- transfer cookie operations (add, clear) to given web response
- Specified by:
writeMetaData
in interface IMetaDataBufferingWebResponse
- Parameters:
response
- web response that should receive the current cookie operation
encodeURL
public String encodeURL(CharSequence url)
- Specified by:
encodeURL
in class Response
encodeRedirectURL
public String encodeRedirectURL(CharSequence url)
- Specified by:
encodeRedirectURL
in class WebResponse
reset
public void reset()
- Overrides:
reset
in class Response
addCookie
public void addCookie(javax.servlet.http.Cookie cookie)
- Specified by:
addCookie
in class WebResponse
clearCookie
public void clearCookie(javax.servlet.http.Cookie cookie)
- Specified by:
clearCookie
in class WebResponse
setContentLength
public void setContentLength(long length)
- Specified by:
setContentLength
in class WebResponse
setContentType
public void setContentType(String mimeType)
- Specified by:
setContentType
in class WebResponse
setDateHeader
public void setDateHeader(String name,
Time date)
- Specified by:
setDateHeader
in class WebResponse
setHeader
public void setHeader(String name,
String value)
- Specified by:
setHeader
in class WebResponse
addHeader
public void addHeader(String name,
String value)
- Specified by:
addHeader
in class WebResponse
disableCaching
public void disableCaching()
- Overrides:
disableCaching
in class WebResponse
write
public void write(CharSequence sequence)
- Specified by:
write
in class Response
getText
public CharSequence getText()
- Returns the text already written to this response.
- Returns:
- text
setText
public void setText(CharSequence text)
- Replaces the text in this response
- Parameters:
text
-
write
public void write(byte[] array)
- Specified by:
write
in class Response
write
public void write(byte[] array,
int offset,
int length)
- Specified by:
write
in class Response
sendRedirect
public void sendRedirect(String url)
- Specified by:
sendRedirect
in class WebResponse
setStatus
public void setStatus(int sc)
- Specified by:
setStatus
in class WebResponse
sendError
public void sendError(int sc,
String msg)
- Specified by:
sendError
in class WebResponse
writeTo
public void writeTo(WebResponse response)
- Writes the content of the buffer to the specified response. Also sets the properties and and
headers.
- Parameters:
response
-
isRedirect
public boolean isRedirect()
- Specified by:
isRedirect
in class WebResponse
flush
public void flush()
- Specified by:
flush
in class WebResponse
toString
public String toString()
- Overrides:
toString
in class Object
- See Also:
Object.toString()
getContainerResponse
public Object getContainerResponse()
- Specified by:
getContainerResponse
in class Response
Copyright © 2006–2016 Apache Software Foundation. All rights reserved.