com.sun.faces.application
Class ViewHandlerPortletResponseWrapper
java.lang.Object
com.sun.faces.application.ViewHandlerPortletResponseWrapper
- All Implemented Interfaces:
- InterweavingResponse, javax.portlet.PortletResponse, javax.portlet.RenderResponse
public class ViewHandlerPortletResponseWrapper
- extends java.lang.Object
- implements javax.portlet.RenderResponse, InterweavingResponse
This is an example of a Portlet implementation of the InterweavingResponse.
Bridges may use this code as an example, or refer to it directly.
Fields inherited from interface javax.portlet.RenderResponse |
EXPIRATION_CACHE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ViewHandlerPortletResponseWrapper
public ViewHandlerPortletResponseWrapper(javax.portlet.RenderResponse response)
resetBuffers
public void resetBuffers()
throws java.io.IOException
- Description copied from interface:
InterweavingResponse
- Clear the internal buffers.
- Specified by:
resetBuffers
in interface InterweavingResponse
- Throws:
java.io.IOException
- if some odd error occurs
isBytes
public boolean isBytes()
- Specified by:
isBytes
in interface InterweavingResponse
- Returns:
true
if content has been
written using an OutputStream
.
isChars
public boolean isChars()
- Specified by:
isChars
in interface InterweavingResponse
- Returns:
true
if content has been
written using a Writer
.
getChars
public char[] getChars()
- Specified by:
getChars
in interface InterweavingResponse
- Returns:
- the buffered character data
getBytes
public byte[] getBytes()
- Specified by:
getBytes
in interface InterweavingResponse
- Returns:
- the buffered byte data
getStatus
public int getStatus()
- Specified by:
getStatus
in interface InterweavingResponse
- Returns:
- the status code of the wrapped response, if it makes
sense to do so.
getContentType
public java.lang.String getContentType()
- Specified by:
getContentType
in interface javax.portlet.RenderResponse
createRenderURL
public javax.portlet.PortletURL createRenderURL()
- Specified by:
createRenderURL
in interface javax.portlet.RenderResponse
createActionURL
public javax.portlet.PortletURL createActionURL()
- Specified by:
createActionURL
in interface javax.portlet.RenderResponse
getNamespace
public java.lang.String getNamespace()
- Specified by:
getNamespace
in interface javax.portlet.RenderResponse
setTitle
public void setTitle(java.lang.String title)
- Specified by:
setTitle
in interface javax.portlet.RenderResponse
setContentType
public void setContentType(java.lang.String type)
- Specified by:
setContentType
in interface javax.portlet.RenderResponse
getCharacterEncoding
public java.lang.String getCharacterEncoding()
- Specified by:
getCharacterEncoding
in interface javax.portlet.RenderResponse
getLocale
public java.util.Locale getLocale()
- Specified by:
getLocale
in interface javax.portlet.RenderResponse
setBufferSize
public void setBufferSize(int size)
- Specified by:
setBufferSize
in interface javax.portlet.RenderResponse
getBufferSize
public int getBufferSize()
- Specified by:
getBufferSize
in interface javax.portlet.RenderResponse
flushBuffer
public void flushBuffer()
throws java.io.IOException
- Specified by:
flushBuffer
in interface javax.portlet.RenderResponse
- Throws:
java.io.IOException
resetBuffer
public void resetBuffer()
- Specified by:
resetBuffer
in interface javax.portlet.RenderResponse
isCommitted
public boolean isCommitted()
- Specified by:
isCommitted
in interface javax.portlet.RenderResponse
reset
public void reset()
- Specified by:
reset
in interface javax.portlet.RenderResponse
getWriter
public java.io.PrintWriter getWriter()
throws java.io.IOException
- Specified by:
getWriter
in interface javax.portlet.RenderResponse
- Throws:
java.io.IOException
getPortletOutputStream
public java.io.OutputStream getPortletOutputStream()
throws java.io.IOException
- Specified by:
getPortletOutputStream
in interface javax.portlet.RenderResponse
- Throws:
java.io.IOException
addProperty
public void addProperty(java.lang.String key,
java.lang.String value)
- Specified by:
addProperty
in interface javax.portlet.PortletResponse
setProperty
public void setProperty(java.lang.String key,
java.lang.String value)
- Specified by:
setProperty
in interface javax.portlet.PortletResponse
encodeURL
public java.lang.String encodeURL(java.lang.String path)
- Specified by:
encodeURL
in interface javax.portlet.PortletResponse
flushContentToWrappedResponse
public void flushContentToWrappedResponse()
throws java.io.IOException
- Description copied from interface:
InterweavingResponse
- Flush the current buffered content to the wrapped
response (this could be a Servlet or Portlet response)
- Specified by:
flushContentToWrappedResponse
in interface InterweavingResponse
- Throws:
java.io.IOException
- if content cannot be written
flushToWriter
public void flushToWriter(java.io.Writer writer,
java.lang.String encoding)
throws java.io.IOException
- Description copied from interface:
InterweavingResponse
- Flush the current buffered content to the provided
Writer
- Specified by:
flushToWriter
in interface InterweavingResponse
- Parameters:
writer
- target Writer
encoding
- the encoding that should be used
- Throws:
java.io.IOException
- if content cannot be written
Copyright ? 2002-2006 Sun Microsystems, Inc. All Rights Reserved.