Package 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 org.apache.wicket.request.http.WebResponse implements IMetaDataBufferingWebResponse
Subclass ofWebResponsethat buffers the actions and performs those on another response.- Author:
- Matej Knopp
- See Also:
writeTo(WebResponse)
-
-
Constructor Summary
Constructors Constructor Description BufferedWebResponse(org.apache.wicket.request.http.WebResponse originalResponse)Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCookie(javax.servlet.http.Cookie cookie)voidaddHeader(java.lang.String name, java.lang.String value)voidclearCookie(javax.servlet.http.Cookie cookie)voiddisableCaching()java.lang.StringencodeRedirectURL(java.lang.CharSequence url)java.lang.StringencodeURL(java.lang.CharSequence url)voidflush()java.lang.ObjectgetContainerResponse()java.lang.CharSequencegetText()Returns the text already written to this response.booleanisRedirect()voidreset()voidsendError(int sc, java.lang.String msg)voidsendRedirect(java.lang.String url)voidsetContentLength(long length)voidsetContentType(java.lang.String mimeType)voidsetDateHeader(java.lang.String name, org.apache.wicket.util.time.Time date)voidsetHeader(java.lang.String name, java.lang.String value)voidsetStatus(int sc)voidsetText(java.lang.CharSequence text)Replaces the text in this responsejava.lang.StringtoString()voidwrite(byte[] array)voidwrite(byte[] array, int offset, int length)voidwrite(java.lang.CharSequence sequence)voidwriteMetaData(org.apache.wicket.request.http.WebResponse response)transfer cookie operations (add, clear) to given web responsevoidwriteTo(org.apache.wicket.request.http.WebResponse response)Writes the content of the buffer to the specified response.
-
-
-
Method Detail
-
writeMetaData
public void writeMetaData(org.apache.wicket.request.http.WebResponse response)
transfer cookie operations (add, clear) to given web response- Specified by:
writeMetaDatain interfaceIMetaDataBufferingWebResponse- Parameters:
response- web response that should receive the current cookie operation
-
encodeURL
public java.lang.String encodeURL(java.lang.CharSequence url)
- Specified by:
encodeURLin classorg.apache.wicket.request.Response
-
encodeRedirectURL
public java.lang.String encodeRedirectURL(java.lang.CharSequence url)
- Specified by:
encodeRedirectURLin classorg.apache.wicket.request.http.WebResponse
-
reset
public void reset()
- Overrides:
resetin classorg.apache.wicket.request.Response
-
addCookie
public void addCookie(javax.servlet.http.Cookie cookie)
- Specified by:
addCookiein classorg.apache.wicket.request.http.WebResponse
-
clearCookie
public void clearCookie(javax.servlet.http.Cookie cookie)
- Specified by:
clearCookiein classorg.apache.wicket.request.http.WebResponse
-
setContentLength
public void setContentLength(long length)
- Specified by:
setContentLengthin classorg.apache.wicket.request.http.WebResponse
-
setContentType
public void setContentType(java.lang.String mimeType)
- Specified by:
setContentTypein classorg.apache.wicket.request.http.WebResponse
-
setDateHeader
public void setDateHeader(java.lang.String name, org.apache.wicket.util.time.Time date)- Specified by:
setDateHeaderin classorg.apache.wicket.request.http.WebResponse
-
setHeader
public void setHeader(java.lang.String name, java.lang.String value)- Specified by:
setHeaderin classorg.apache.wicket.request.http.WebResponse
-
addHeader
public void addHeader(java.lang.String name, java.lang.String value)- Specified by:
addHeaderin classorg.apache.wicket.request.http.WebResponse
-
disableCaching
public void disableCaching()
- Overrides:
disableCachingin classorg.apache.wicket.request.http.WebResponse
-
write
public void write(java.lang.CharSequence sequence)
- Specified by:
writein classorg.apache.wicket.request.Response
-
getText
public java.lang.CharSequence getText()
Returns the text already written to this response.- Returns:
- text
-
setText
public void setText(java.lang.CharSequence text)
Replaces the text in this response- Parameters:
text-
-
write
public void write(byte[] array)
- Specified by:
writein classorg.apache.wicket.request.Response
-
write
public void write(byte[] array, int offset, int length)- Specified by:
writein classorg.apache.wicket.request.Response
-
sendRedirect
public void sendRedirect(java.lang.String url)
- Specified by:
sendRedirectin classorg.apache.wicket.request.http.WebResponse
-
setStatus
public void setStatus(int sc)
- Specified by:
setStatusin classorg.apache.wicket.request.http.WebResponse
-
sendError
public void sendError(int sc, java.lang.String msg)- Specified by:
sendErrorin classorg.apache.wicket.request.http.WebResponse
-
writeTo
public void writeTo(org.apache.wicket.request.http.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:
isRedirectin classorg.apache.wicket.request.http.WebResponse
-
flush
public void flush()
- Specified by:
flushin classorg.apache.wicket.request.http.WebResponse
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
getContainerResponse
public java.lang.Object getContainerResponse()
- Specified by:
getContainerResponsein classorg.apache.wicket.request.Response
-
-