1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5
<!-- Generated by javadoc (build 1.4.2_02) on Thu Jan 22 21:11:43 CET 2004 -->
7
ResponseContent (OSCache 2.0.2-22Jan04 API)
10
<META NAME="keywords" CONTENT="com.opensymphony.oscache.web.filter.ResponseContent class">
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../api.css" TITLE="Style">
14
<SCRIPT type="text/javascript">
15
function windowTitle()
17
parent.document.title="ResponseContent (OSCache 2.0.2-22Jan04 API)";
23
<BODY BGCOLOR="white" onload="windowTitle();">
26
<!-- ========= START OF TOP NAVBAR ======= -->
27
<A NAME="navbar_top"><!-- --></A>
28
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
29
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
31
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
32
<A NAME="navbar_top_firstrow"><!-- --></A>
33
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
34
<TR ALIGN="center" VALIGN="top">
35
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
36
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
37
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
38
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ResponseContent.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
39
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
40
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
41
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
42
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
46
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
53
<A HREF="../../../../../com/opensymphony/oscache/web/filter/CacheHttpServletResponseWrapper.html" title="class in com.opensymphony.oscache.web.filter"><B>PREV CLASS</B></A>
54
<A HREF="../../../../../com/opensymphony/oscache/web/filter/SplitServletOutputStream.html" title="class in com.opensymphony.oscache.web.filter"><B>NEXT CLASS</B></A></FONT></TD>
55
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
56
<A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
57
<A HREF="ResponseContent.html" target="_top"><B>NO FRAMES</B></A>
58
<SCRIPT type="text/javascript">
61
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
66
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
72
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
73
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
74
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
75
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
78
<A NAME="skip-navbar_top"></A>
79
<!-- ========= END OF TOP NAVBAR ========= -->
82
<!-- ======== START OF CLASS DATA ======== -->
85
com.opensymphony.oscache.web.filter</FONT>
87
Class ResponseContent</H2>
90
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>com.opensymphony.oscache.web.filter.ResponseContent</B>
93
<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD>
97
<DT>public class <B>ResponseContent</B><DT>extends java.lang.Object<DT>implements java.io.Serializable</DL>
100
Holds the servlet response in a byte array so that it can be held
101
in the cache (and, since this class is serializable, optionally
107
<DT><B>Version:</B></DT>
108
<DD>$Revision: 1.1 $</DD>
109
<DT><B>Author:</B></DT>
110
<DD><a href="mailto:sergek@lokitech.com">Serge Knystautas</a></DD>
111
<DT><B>See Also:</B><DD><A HREF="../../../../../serialized-form.html#com.opensymphony.oscache.web.filter.ResponseContent">Serialized Form</A></DL>
115
<!-- ======== NESTED CLASS SUMMARY ======== -->
118
<!-- =========== FIELD SUMMARY =========== -->
121
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
123
<A NAME="constructor_summary"><!-- --></A>
124
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
125
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
126
<TD COLSPAN=2><FONT SIZE="+2">
127
<B>Constructor Summary</B></FONT></TD>
129
<TR BGCOLOR="white" CLASS="TableRowColor">
130
<TD><CODE><B><A HREF="../../../../../com/opensymphony/oscache/web/filter/ResponseContent.html#ResponseContent()">ResponseContent</A></B>()</CODE>
133
</TD>
137
<!-- ========== METHOD SUMMARY =========== -->
139
<A NAME="method_summary"><!-- --></A>
140
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
141
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
142
<TD COLSPAN=2><FONT SIZE="+2">
143
<B>Method Summary</B></FONT></TD>
145
<TR BGCOLOR="white" CLASS="TableRowColor">
146
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
147
<CODE> void</CODE></FONT></TD>
148
<TD><CODE><B><A HREF="../../../../../com/opensymphony/oscache/web/filter/ResponseContent.html#commit()">commit</A></B>()</CODE>
151
Called once the response has been written in its entirety. </TD>
153
<TR BGCOLOR="white" CLASS="TableRowColor">
154
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
155
<CODE> java.io.OutputStream</CODE></FONT></TD>
156
<TD><CODE><B><A HREF="../../../../../com/opensymphony/oscache/web/filter/ResponseContent.html#getOutputStream()">getOutputStream</A></B>()</CODE>
159
Get an output stream. </TD>
161
<TR BGCOLOR="white" CLASS="TableRowColor">
162
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
163
<CODE> int</CODE></FONT></TD>
164
<TD><CODE><B><A HREF="../../../../../com/opensymphony/oscache/web/filter/ResponseContent.html#getSize()">getSize</A></B>()</CODE>
167
Gets the size of this cached content.</TD>
169
<TR BGCOLOR="white" CLASS="TableRowColor">
170
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
171
<CODE> void</CODE></FONT></TD>
172
<TD><CODE><B><A HREF="../../../../../com/opensymphony/oscache/web/filter/ResponseContent.html#setContentType(java.lang.String)">setContentType</A></B>(java.lang.String value)</CODE>
175
Set the content type. </TD>
177
<TR BGCOLOR="white" CLASS="TableRowColor">
178
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
179
<CODE> void</CODE></FONT></TD>
180
<TD><CODE><B><A HREF="../../../../../com/opensymphony/oscache/web/filter/ResponseContent.html#setLocale(java.util.Locale)">setLocale</A></B>(java.util.Locale value)</CODE>
183
Set the Locale. </TD>
185
<TR BGCOLOR="white" CLASS="TableRowColor">
186
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
187
<CODE> void</CODE></FONT></TD>
188
<TD><CODE><B><A HREF="../../../../../com/opensymphony/oscache/web/filter/ResponseContent.html#writeTo(javax.servlet.ServletResponse)">writeTo</A></B>(javax.servlet.ServletResponse response)</CODE>
191
Writes this cached data out to the supplied <code>ServletResponse</code>.</TD>
194
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
195
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
196
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
197
<TD><B>Methods inherited from class java.lang.Object</B></TD>
199
<TR BGCOLOR="white" CLASS="TableRowColor">
200
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
206
<!-- ============ FIELD DETAIL =========== -->
209
<!-- ========= CONSTRUCTOR DETAIL ======== -->
211
<A NAME="constructor_detail"><!-- --></A>
212
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
213
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
214
<TD COLSPAN=1><FONT SIZE="+2">
215
<B>Constructor Detail</B></FONT></TD>
219
<A NAME="ResponseContent()"><!-- --></A><H3>
222
public <B>ResponseContent</B>()</PRE>
226
<!-- ============ METHOD DETAIL ========== -->
228
<A NAME="method_detail"><!-- --></A>
229
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
230
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
231
<TD COLSPAN=1><FONT SIZE="+2">
232
<B>Method Detail</B></FONT></TD>
236
<A NAME="setContentType(java.lang.String)"><!-- --></A><H3>
239
public void <B>setContentType</B>(java.lang.String value)</PRE>
241
<DD>Set the content type. We capture this so that when we serve this
242
data from cache, we can set the correct content type on the response.
253
<A NAME="setLocale(java.util.Locale)"><!-- --></A><H3>
256
public void <B>setLocale</B>(java.util.Locale value)</PRE>
258
<DD>Set the Locale. We capture this so that when we serve this data from
259
cache, we can set the correct locale on the response.
270
<A NAME="getOutputStream()"><!-- --></A><H3>
273
public java.io.OutputStream <B>getOutputStream</B>()</PRE>
275
<DD>Get an output stream. This is used by the <A HREF="../../../../../com/opensymphony/oscache/web/filter/SplitServletOutputStream.html" title="class in com.opensymphony.oscache.web.filter"><CODE>SplitServletOutputStream</CODE></A>
276
to capture the original (uncached) response into a byte array.
287
<A NAME="getSize()"><!-- --></A><H3>
290
public int <B>getSize</B>()</PRE>
292
<DD>Gets the size of this cached content.
299
<DT><B>Returns:</B><DD>The size of the content, in bytes. If no content
300
exists, this method returns <code>-1</code>.</DL>
305
<A NAME="commit()"><!-- --></A><H3>
308
public void <B>commit</B>()</PRE>
310
<DD>Called once the response has been written in its entirety. This
311
method commits the response output stream by converting the output
312
stream into a byte array.
323
<A NAME="writeTo(javax.servlet.ServletResponse)"><!-- --></A><H3>
326
public void <B>writeTo</B>(javax.servlet.ServletResponse response)
327
throws java.io.IOException</PRE>
329
<DD>Writes this cached data out to the supplied <code>ServletResponse</code>.
335
<DT><B>Parameters:</B><DD><CODE>response</CODE> - The servlet response to output the cached content to.
337
<DD><CODE>java.io.IOException</CODE></DL>
340
<!-- ========= END OF CLASS DATA ========= -->
344
<!-- ======= START OF BOTTOM NAVBAR ====== -->
345
<A NAME="navbar_bottom"><!-- --></A>
346
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
347
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
349
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
350
<A NAME="navbar_bottom_firstrow"><!-- --></A>
351
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
352
<TR ALIGN="center" VALIGN="top">
353
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
354
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
355
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
356
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ResponseContent.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
357
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
358
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
359
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
360
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
364
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
365
See <a href=http://www.opensymphony.com/ target=_top>www.opensymphony.com</a> for more information.</EM>
370
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
371
<A HREF="../../../../../com/opensymphony/oscache/web/filter/CacheHttpServletResponseWrapper.html" title="class in com.opensymphony.oscache.web.filter"><B>PREV CLASS</B></A>
372
<A HREF="../../../../../com/opensymphony/oscache/web/filter/SplitServletOutputStream.html" title="class in com.opensymphony.oscache.web.filter"><B>NEXT CLASS</B></A></FONT></TD>
373
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
374
<A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
375
<A HREF="ResponseContent.html" target="_top"><B>NO FRAMES</B></A>
376
<SCRIPT type="text/javascript">
379
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
384
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
390
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
391
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
392
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
393
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
396
<A NAME="skip-navbar_bottom"></A>
397
<!-- ======== END OF BOTTOM NAVBAR ======= -->