groovy.servlet
Class ServletBinding.ServletOutput

java.lang.Object
  extended by groovy.servlet.ServletBinding.ServletOutput
Enclosing class:
ServletBinding

private static class ServletBinding.ServletOutput
extends java.lang.Object

A class to manage the response output stream and writer. If the stream have been 'used', then using the writer will cause a IllegalStateException. If the writer have been 'used', then using the stream will cause a IllegalStateException. 'used' means any write method has been called. Simply requesting the objects will not cause an exception.

Author:
Jochen Theodorou

Field Summary
private  javax.servlet.ServletOutputStream outputStream
           
private  javax.servlet.http.HttpServletResponse response
           
private  java.io.PrintWriter writer
           
 
Constructor Summary
ServletBinding.ServletOutput(javax.servlet.http.HttpServletResponse response)
           
 
Method Summary
 javax.servlet.ServletOutputStream getOutputStream()
           
private  javax.servlet.ServletOutputStream getResponseStream()
           
private  java.io.PrintWriter getResponseWriter()
           
 java.io.PrintWriter getWriter()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

response

private javax.servlet.http.HttpServletResponse response

outputStream

private javax.servlet.ServletOutputStream outputStream

writer

private java.io.PrintWriter writer
Constructor Detail

ServletBinding.ServletOutput

public ServletBinding.ServletOutput(javax.servlet.http.HttpServletResponse response)
Method Detail

getResponseStream

private javax.servlet.ServletOutputStream getResponseStream()
                                                     throws java.io.IOException
Throws:
java.io.IOException

getOutputStream

public javax.servlet.ServletOutputStream getOutputStream()

getResponseWriter

private java.io.PrintWriter getResponseWriter()

getWriter

public java.io.PrintWriter getWriter()


Copyright © ${year} The Codehaus. All Rights Reserved.