📄 mimeresponse.java
字号:
* Before calling this method the content type of the render response should
* be set using the {@link #setContentType} method.
* <p>
* Either this method or {@link #getPortletOutputStream} may be called to
* write the body, not both.
*
* @return a <code>PrintWriter</code> object that can return character
* data to the portal
*
* @exception java.io.IOException
* if an input or output exception occurred
* @exception java.lang.IllegalStateException
* if the <code>getPortletOutputStream</code> method has
* been called on this response.
*
* @see #setContentType
* @see #getPortletOutputStream
*/
public java.io.PrintWriter getWriter() throws java.io.IOException;
/**
* Returns the locale assigned to the response.
*
* @return Locale of this response
*/
public java.util.Locale getLocale();
/**
* 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>.
*
* @param size
* the preferred buffer size
*
* @exception java.lang.IllegalStateException
* if this method is called after content has been written,
* or the portlet container does not support buffering
*
* @see #getBufferSize
* @see #flushBuffer
* @see #isCommitted
* @see #reset
*/
public void setBufferSize(int size);
/**
* Returns the actual buffer size used for the response. If no buffering is
* used, this method returns 0.
*
* @return the actual buffer size used
*
* @see #setBufferSize
* @see #flushBuffer
* @see #isCommitted
* @see #reset
*/
public int getBufferSize();
/**
* Forces any content in the buffer to be written to the underlying output stream. A call to
* this method automatically commits the response.
*
* @exception java.io.IOException
* if an error occurred when writing the output
*
* @see #setBufferSize
* @see #getBufferSize
* @see #isCommitted
* @see #reset
*/
public void flushBuffer() throws java.io.IOException;
/**
* 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>.
*
* @exception IllegalStateException
* if this method is called after response is committed
*
* @see #setBufferSize
* @see #getBufferSize
* @see #isCommitted
* @see #reset
*/
public void resetBuffer();
/**
* Returns a boolean indicating if the response has been committed.
*
* @return a boolean indicating if the response has been committed
*
* @see #setBufferSize
* @see #getBufferSize
* @see #flushBuffer
* @see #reset
*/
public boolean isCommitted();
/**
* 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>.
*
* @exception java.lang.IllegalStateException
* if the response has already been committed
*
* @see #setBufferSize
* @see #getBufferSize
* @see #flushBuffer
* @see #isCommitted
*/
public void reset();
/**
* 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 {@link #setContentType} method.
* <p>
* Calling <code>flush()</code> on the OutputStream commits the response.
* <p>
* Either this method or {@link #getWriter} may be called to write the body,
* not both.
*
* @return a <code>OutputStream</code> for writing binary data
*
* @exception java.lang.IllegalStateException
* if the <code>getWriter</code> method has been called on
* this response.
*
* @exception java.io.IOException
* if an input or output exception occurred
*
* @see #setContentType
* @see #getWriter
*/
public java.io.OutputStream getPortletOutputStream()
throws java.io.IOException;
/**
* 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.
*
* @return a portlet render URL
*/
public PortletURL createRenderURL();
/**
* 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.
*
* @return a portlet action URL
*/
public PortletURL createActionURL();
/**
* 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.
*
* @since 2.0
* @return a portlet resource URL
*/
public ResourceURL createResourceURL();
/**
* Returns the cache control object allowing to set
* specific cache settings valid for the markup
* returned in this response.
*
* @return Cache control for the current response.
*
* @since 2.0
*/
public CacheControl getCacheControl();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -