📄 renderresponse.html.svn-base
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Mon Sep 08 18:33:40 CEST 2003 --><TITLE>Portlet API (V1.0) : Interface RenderResponse</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>Portlet API (V1.0) </EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../javax/portlet/RenderRequest.html"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="RenderResponse.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.portlet</FONT><BR>Interface RenderResponse</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../javax/portlet/PortletResponse.html">PortletResponse</A></DD></DL><HR><DL><DT>public interface <B>RenderResponse</B><DT>extends <A HREF="../../javax/portlet/PortletResponse.html">PortletResponse</A></DL><P>The <CODE>RenderResponse</CODE> defines an object to assist a portlet in sending a response to the portal. It extends the <CODE>PortletResponse</CODE> interface to provide specific render response functionality to portlets.<br> The portlet container creates a <CODE>RenderResponse</CODE> object and passes it as argument to the portlet's <CODE>render</CODE> method.<P><DL><DT><B>See Also: </B><DD><A HREF="../../javax/portlet/RenderRequest.html"><CODE>RenderRequest</CODE></A>, <A HREF="../../javax/portlet/PortletResponse.html"><CODE>PortletResponse</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/RenderResponse.html#EXPIRATION_CACHE">EXPIRATION_CACHE</A></B></CODE><BR> Property to set the expiration time in seconds for this response using the <code>setProperty</code> method.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/portlet/PortletURL.html">PortletURL</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/RenderResponse.html#createActionURL()">createActionURL</A></B>()</CODE><BR> Creates a portlet URL targeting the portlet.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/portlet/PortletURL.html">PortletURL</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/RenderResponse.html#createRenderURL()">createRenderURL</A></B>()</CODE><BR> Creates a portlet URL targeting the portlet.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/RenderResponse.html#flushBuffer()">flushBuffer</A></B>()</CODE><BR> Forces any content in the buffer to be written to the client.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/RenderResponse.html#getBufferSize()">getBufferSize</A></B>()</CODE><BR> Returns the actual buffer size used for the response.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/RenderResponse.html#getCharacterEncoding()">getCharacterEncoding</A></B>()</CODE><BR> Returns the name of the charset used for the MIME body sent in this response.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/RenderResponse.html#getContentType()">getContentType</A></B>()</CODE><BR> Returns the MIME type that can be used to contribute markup to the render response.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Locale</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/RenderResponse.html#getLocale()">getLocale</A></B>()</CODE><BR> Returns the locale assigned to the response.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/RenderResponse.html#getNamespace()">getNamespace</A></B>()</CODE><BR> The value returned by this method should be prefixed or appended to elements, such as JavaScript variables or function names, to ensure they are unique in the context of the portal page.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.io.OutputStream</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/RenderResponse.html#getPortletOutputStream()">getPortletOutputStream</A></B>()</CODE><BR> Returns a <code>OutputStream</code> suitable for writing binary data in the response.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.io.PrintWriter</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/RenderResponse.html#getWriter()">getWriter</A></B>()</CODE><BR> Returns a PrintWriter object that can send character text to the portal.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/RenderResponse.html#isCommitted()">isCommitted</A></B>()</CODE><BR> Returns a boolean indicating if the response has been committed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/RenderResponse.html#reset()">reset</A></B>()</CODE><BR> Clears any data that exists in the buffer as well as the properties set.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/RenderResponse.html#resetBuffer()">resetBuffer</A></B>()</CODE><BR> Clears the content of the underlying buffer in the response without clearing properties set.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/RenderResponse.html#setBufferSize(int)">setBufferSize</A></B>(int size)</CODE><BR> Sets the preferred buffer size for the body of the response.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/RenderResponse.html#setContentType(java.lang.String)">setContentType</A></B>(java.lang.String type)</CODE><BR> Sets the MIME type for the render response.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/RenderResponse.html#setTitle(java.lang.String)">setTitle</A></B>(java.lang.String title)</CODE><BR> This method sets the title of the portlet.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_javax.portlet.PortletResponse"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface javax.portlet.<A HREF="../../javax/portlet/PortletResponse.html">PortletResponse</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../javax/portlet/PortletResponse.html#addProperty(java.lang.String, java.lang.String)">addProperty</A>, <A HREF="../../javax/portlet/PortletResponse.html#encodeURL(java.lang.String)">encodeURL</A>, <A HREF="../../javax/portlet/PortletResponse.html#setProperty(java.lang.String, java.lang.String)">setProperty</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="EXPIRATION_CACHE"><!-- --></A><H3>EXPIRATION_CACHE</H3><PRE>public static final java.lang.String <B>EXPIRATION_CACHE</B></PRE><DL><DD>Property to set the expiration time in seconds for this response using the <code>setProperty</code> method. <P> If the expiration value is set to 0, caching is disabled for this portlet; if the value is set to -1, the cache does not expire. <p> The value is <code>"portlet.expiration-cache"</code>.</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getContentType()"><!-- --></A><H3>getContentType</H3><PRE>public java.lang.String <B>getContentType</B>()</PRE><DL><DD>Returns the MIME type that can be used to contribute markup to the render response. <p> If no content type was set previously using the <A HREF="../../javax/portlet/RenderResponse.html#setContentType(java.lang.String)"><CODE>setContentType(java.lang.String)</CODE></A> method this method retuns <code>null</code>.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the MIME type of the response, or <code>null</code> if no content type is set<DT><B>See Also: </B><DD><A HREF="../../javax/portlet/RenderResponse.html#setContentType(java.lang.String)"><CODE>setContentType(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="createRenderURL()"><!-- --></A><H3>createRenderURL</H3><PRE>public <A HREF="../../javax/portlet/PortletURL.html">PortletURL</A> <B>createRenderURL</B>()</PRE><DL><DD>Creates a portlet URL targeting the portlet. If no portlet mode, window state or security modifier is set in the PortletURL the current values are preserved. If a request is triggered by the PortletURL, it results in a render request. <p> The returned URL can be further extended by adding portlet-specific parameters and portlet modes and window states. <p> The created URL will per default not contain any parameters of the current render request.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a portlet render URL</DL></DD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -