## org.codehaus.groovy.grails.web.pages
Class GSPResponseWriter

    java.lang.Object
      java.io.Writer
          java.io.PrintWriter
              org.codehaus.groovy.grails.web.util.GrailsPrintWriter
                  org.codehaus.groovy.grails.web.pages.GSPResponseWriter

All Implemented Interfaces:
  Closeable, Flushable, Appendable

    public class GSPResponseWriter

extends GrailsPrintWriter

NOTE: Based on work done by on the GSP standalone project (https://gsp.dev.java.net/) A buffered writer that won't commit the response until the buffer has reached the high water mark, or until flush() or close() is called. Performance optimizations by Lari Hotari, 13.03.2009 Calculating the Content-Length has been disabled by default since Jetty ignores it (uses Chunked mode anyways). Content-Length mode can be enabled with -DGSPResponseWriter.enableContentLength=true system property.

Author:
  Troy Heninger, Graeme Rocher, Lari Hotari, Sagire Software Oy Date: Jan 10, 2004

Field Summary

Fields inherited from class org.codehaus.groovy.grails.web.util.GrailsPrintWriter
`allowUnwrappingOut, out, trouble`

Fields inherited from class java.io.Writer
`lock`

Method Summary
`void` `close()` Close the stream.
`static GSPResponseWriter` `getInstance(ServletResponse response)`

Methods inherited from class org.codehaus.groovy.grails.web.util.GrailsPrintWriter

`append, append, append, append, append, checkError, clone, flush, getFinalTarget, getOut, handleIOException, isAllowUnwrappingOut, isFinalTargetHere, isUsed, leftShift, leftShift, leftShift, plus, print, print, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, println, resetUsed, setFinalTargetHere, setUsed, write, write, write, write, write, write, write`

Methods inherited from class java.io.PrintWriter
`format, format, printf, printf, setError`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static GSPResponseWriter getInstance(ServletResponse response)

### close

    public void close()

  Close the stream.

  Specified by:
    `close` in interface `Closeable`
  Overrides:
    `close` in class `PrintWriter`
  See Also:
    `GrailsPrintWriter.checkError()`

Copyright (c) 2005-2009 The Grails project