com.sun.faces.application
Interface InterweavingResponse

All Known Implementing Classes:
ViewHandlerPortletResponseWrapper, ViewHandlerResponseWrapper

public interface InterweavingResponse

Allow content interweaving via Servlet or Porlet using a common interface.

Implementations of this interface must cache all content, beit byte or character following similar semantics of the Servlet and Porlet response classes. Buffered content should only be written when explicitly requested.


Method Summary
 void flushContentToWrappedResponse()
          Flush the current buffered content to the wrapped response (this could be a Servlet or Portlet response)
 void flushToWriter(java.io.Writer writer, java.lang.String encoding)
          Flush the current buffered content to the provided Writer
 byte[] getBytes()
           
 char[] getChars()
           
 int getStatus()
           
 boolean isBytes()
           
 boolean isChars()
           
 void resetBuffers()
          Clear the internal buffers.
 

Method Detail

flushContentToWrappedResponse

void flushContentToWrappedResponse()
                                   throws java.io.IOException
Flush the current buffered content to the wrapped response (this could be a Servlet or Portlet response)

Throws:
java.io.IOException - if content cannot be written

flushToWriter

void flushToWriter(java.io.Writer writer,
                   java.lang.String encoding)
                   throws java.io.IOException
Flush the current buffered content to the provided Writer

Parameters:
writer - target Writer
encoding - the encoding that should be used
Throws:
java.io.IOException - if content cannot be written

resetBuffers

void resetBuffers()
                  throws java.io.IOException
Clear the internal buffers.

Throws:
java.io.IOException - if some odd error occurs

isBytes

boolean isBytes()
Returns:
true if content has been written using an OutputStream.

isChars

boolean isChars()
Returns:
true if content has been written using a Writer.

getChars

char[] getChars()
Returns:
the buffered character data

getBytes

byte[] getBytes()
Returns:
the buffered byte data

getStatus

int getStatus()
Returns:
the status code of the wrapped response, if it makes sense to do so.


Copyright ? 2002-2006 Sun Microsystems, Inc. All Rights Reserved.