sunlabs.brazil.servlet
Class BServletRequest.HttpOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by sunlabs.brazil.server.Request.HttpOutputStream
              extended by sunlabs.brazil.servlet.BServletRequest.HttpOutputStream
All Implemented Interfaces:
Closeable, Flushable
Enclosing class:
BServletRequest

public static class BServletRequest.HttpOutputStream
extends Request.HttpOutputStream

An HttpOutputStream that is used by the Brazil Servlet adaptor to add the web application context path to the front of all response URI's so subsequent requests will be mapped to the BrazilServlet's context. See comments in BrazilServlet that describe the assumptions regarding the context path.

See Also:
BrazilServlet

Field Summary
 
Fields inherited from class sunlabs.brazil.server.Request.HttpOutputStream
bytesWritten
 
Constructor Summary
BServletRequest.HttpOutputStream(OutputStream out)
           
 
Method Summary
 void close()
          Remaps URI's in the buffered HTML content and the writes the result to the response stream.
 void sendHeaders(Request request)
          If the response content type is text/html, this method interposes a buffer before the response stream that gathers all content for subsequent URI rewriting.
 
Methods inherited from class sunlabs.brazil.server.Request.HttpOutputStream
canChunk, write, write, writeBytes
 
Methods inherited from class java.io.FilterOutputStream
flush, write, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BServletRequest.HttpOutputStream

public BServletRequest.HttpOutputStream(OutputStream out)
Method Detail

sendHeaders

public void sendHeaders(Request request)
                 throws IOException
If the response content type is text/html, this method interposes a buffer before the response stream that gathers all content for subsequent URI rewriting.

Overrides:
sendHeaders in class Request.HttpOutputStream
Throws:
IOException

close

public void close()
           throws IOException
Remaps URI's in the buffered HTML content and the writes the result to the response stream.

Specified by:
close in interface Closeable
Overrides:
close in class FilterOutputStream
Throws:
IOException

Version Kenai-svn-r24, Generated 08/18/09
Copyright (c) 2001-2009, Sun Microsystems.