📄 mimeresponse.html.svn-base
字号:
setBufferSize</H3><PRE>void <B>setBufferSize</B>(int size)</PRE><DL><DD>Sets the preferred buffer size for the body of the response. The portlet container will use a buffer at least as large as the size requested. <p> This method must be called before any response body content is written; if content has been written, or the portlet container does not support buffering, this method may throw an <code>IllegalStateException</code>.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>size</CODE> - the preferred buffer size<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if this method is called after content has been written, or the portlet container does not support buffering<DT><B>See Also:</B><DD><A HREF="../../javax/portlet/MimeResponse.html#getBufferSize()"><CODE>getBufferSize()</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#flushBuffer()"><CODE>flushBuffer()</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#isCommitted()"><CODE>isCommitted()</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#reset()"><CODE>reset()</CODE></A></DL></DD></DL><HR><A NAME="getBufferSize()"><!-- --></A><H3>getBufferSize</H3><PRE>int <B>getBufferSize</B>()</PRE><DL><DD>Returns the actual buffer size used for the response. If no buffering is used, this method returns 0.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the actual buffer size used<DT><B>See Also:</B><DD><A HREF="../../javax/portlet/MimeResponse.html#setBufferSize(int)"><CODE>setBufferSize(int)</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#flushBuffer()"><CODE>flushBuffer()</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#isCommitted()"><CODE>isCommitted()</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#reset()"><CODE>reset()</CODE></A></DL></DD></DL><HR><A NAME="flushBuffer()"><!-- --></A><H3>flushBuffer</H3><PRE>void <B>flushBuffer</B>() throws java.io.IOException</PRE><DL><DD>Forces any content in the buffer to be written to the underlying output stream. A call to this method automatically commits the response.<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if an error occurred when writing the output<DT><B>See Also:</B><DD><A HREF="../../javax/portlet/MimeResponse.html#setBufferSize(int)"><CODE>setBufferSize(int)</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#getBufferSize()"><CODE>getBufferSize()</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#isCommitted()"><CODE>isCommitted()</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#reset()"><CODE>reset()</CODE></A></DL></DD></DL><HR><A NAME="resetBuffer()"><!-- --></A><H3>resetBuffer</H3><PRE>void <B>resetBuffer</B>()</PRE><DL><DD>Clears the content of the underlying buffer in the response without clearing properties set. If the response has been committed, this method throws an <code>IllegalStateException</code>.<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if this method is called after response is committed<DT><B>See Also:</B><DD><A HREF="../../javax/portlet/MimeResponse.html#setBufferSize(int)"><CODE>setBufferSize(int)</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#getBufferSize()"><CODE>getBufferSize()</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#isCommitted()"><CODE>isCommitted()</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#reset()"><CODE>reset()</CODE></A></DL></DD></DL><HR><A NAME="isCommitted()"><!-- --></A><H3>isCommitted</H3><PRE>boolean <B>isCommitted</B>()</PRE><DL><DD>Returns a boolean indicating if the response has been committed.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a boolean indicating if the response has been committed<DT><B>See Also:</B><DD><A HREF="../../javax/portlet/MimeResponse.html#setBufferSize(int)"><CODE>setBufferSize(int)</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#getBufferSize()"><CODE>getBufferSize()</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#flushBuffer()"><CODE>flushBuffer()</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#reset()"><CODE>reset()</CODE></A></DL></DD></DL><HR><A NAME="reset()"><!-- --></A><H3>reset</H3><PRE>void <B>reset</B>()</PRE><DL><DD>Clears any data that exists in the buffer as well as the properties set. If the response has been committed, this method throws an <code>IllegalStateException</code>.<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if the response has already been committed<DT><B>See Also:</B><DD><A HREF="../../javax/portlet/MimeResponse.html#setBufferSize(int)"><CODE>setBufferSize(int)</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#getBufferSize()"><CODE>getBufferSize()</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#flushBuffer()"><CODE>flushBuffer()</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#isCommitted()"><CODE>isCommitted()</CODE></A></DL></DD></DL><HR><A NAME="getPortletOutputStream()"><!-- --></A><H3>getPortletOutputStream</H3><PRE>java.io.OutputStream <B>getPortletOutputStream</B>() throws java.io.IOException</PRE><DL><DD>Returns a <code>OutputStream</code> suitable for writing binary data in the response. The portlet container does not encode the binary data. <p> Before calling this method the content type of the render response must be set using the <A HREF="../../javax/portlet/MimeResponse.html#setContentType(java.lang.String)"><CODE>setContentType(java.lang.String)</CODE></A> method. <p> Calling <code>flush()</code> on the OutputStream commits the response. <p> Either this method or <A HREF="../../javax/portlet/MimeResponse.html#getWriter()"><CODE>getWriter()</CODE></A> may be called to write the body, not both.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a <code>OutputStream</code> for writing binary data<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if the <code>getWriter</code> method has been called on this response.<DD><CODE>java.io.IOException</CODE> - if an input or output exception occurred<DT><B>See Also:</B><DD><A HREF="../../javax/portlet/MimeResponse.html#setContentType(java.lang.String)"><CODE>setContentType(java.lang.String)</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#getWriter()"><CODE>getWriter()</CODE></A></DL></DD></DL><HR><A NAME="createRenderURL()"><!-- --></A><H3>createRenderURL</H3><PRE><A HREF="../../javax/portlet/PortletURL.html" title="interface in javax.portlet">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.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a portlet render URL</DL></DD></DL><HR><A NAME="createActionURL()"><!-- --></A><H3>createActionURL</H3><PRE><A HREF="../../javax/portlet/PortletURL.html" title="interface in javax.portlet">PortletURL</A> <B>createActionURL</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 an action 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.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a portlet action URL</DL></DD></DL><HR><A NAME="createResourceURL()"><!-- --></A><H3>createResourceURL</H3><PRE><A HREF="../../javax/portlet/ResourceURL.html" title="interface in javax.portlet">ResourceURL</A> <B>createResourceURL</B>()</PRE><DL><DD>Creates a portlet URL targeting the portlet. If no security modifier is set in the PortletURL the current values are preserved. The current render parameters, portlet mode and window state are preserved. <p> If a request is triggered by the PortletURL, it results in a serve resource request of the <code>ResourceServingPortlet</code> interface. <p> The returned URL can be further extended by adding portlet-specific parameters . <p> The created URL will per default contain the current cacheability setting of the parent resource. If no parent resource is available, <code>PAGE</code> is the default.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a portlet resource URL<DT><B>Since:</B></DT> <DD>2.0</DD></DL></DD></DL><HR><A NAME="getCacheControl()"><!-- --></A><H3>getCacheControl</H3><PRE><A HREF="../../javax/portlet/CacheControl.html" title="interface in javax.portlet">CacheControl</A> <B>getCacheControl</B>()</PRE><DL><DD>Returns the cache control object allowing to set specific cache settings valid for the markup returned in this response.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Cache control for the current response.<DT><B>Since:</B></DT> <DD>2.0</DD></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <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="class-use/MimeResponse.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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-files/index-1.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></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../javax/portlet/GenericPortlet.html" title="class in javax.portlet"><B>PREV CLASS</B></A> <A HREF="../../javax/portlet/PortalContext.html" title="interface in javax.portlet"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?javax/portlet/MimeResponse.html" target="_top"><B>FRAMES</B></A> <A HREF="MimeResponse.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <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><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -