KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > displaytag > filter > BufferedResponseWrapper


1 /**
2  * Licensed under the Artistic License; you may not use this file
3  * except in compliance with the License.
4  * You may obtain a copy of the License at
5  *
6  * http://displaytag.sourceforge.net/license.html
7  *
8  * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
9  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
10  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11  */

12 package org.displaytag.filter;
13
14 import javax.servlet.http.HttpServletResponse JavaDoc;
15
16
17 /**
18  * Buffers the response; will not send anything directly through to the actual response. Note that this blocks the
19  * content-type from being set, you must set it manually in the response.
20  * @author Fabrizio Giustina
21  * @version $Revision: 749 $ ($Author: fgiust $)
22  */

23 public interface BufferedResponseWrapper extends HttpServletResponse JavaDoc
24 {
25
26     /**
27      * Headers which cause problems during file download.
28      */

29     String JavaDoc[] FILTERED_HEADERS = new String JavaDoc[]{"cache-control", "expires", "pragma"};
30
31     /**
32      * Return <code>true</code> if ServletOutputStream has been requested from Table tag.
33      * @return <code>true</code> if ServletOutputStream has been requested
34      */

35     boolean isOutRequested();
36
37     /**
38      * If the app server sets the content-type of the response, it is sticky and you will not be able to change it.
39      * Therefore it is intercepted here.
40      * @return the ContentType that was most recently set
41      */

42     String JavaDoc getContentType();
43
44     /**
45      * Returns the String representation of the content written to the response.
46      * @return the content of the response
47      */

48     String JavaDoc getContentAsString();
49
50 }
51
Popular Tags