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
Methods inherited from class org.codehaus.groovy.grails.web.util.GrailsPrintWriter |
append, append, append, checkError, clone, flush, getFinalTarget, getOut, handleIOException, isFinalTargetHere, leftShift, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, setFinalTargetHere, write, write, write, write, write |
getInstance
public static GSPResponseWriter getInstance(ServletResponse response,
int max)
- Static factory methdirectWritingod to create the writer.
- Parameters:
response
- max
-
- Returns:
- A GSPResponseWriter instance
getInstance
public static GSPResponseWriter getInstance(Writer target,
int max)
- Static factory method to create the writer.
- Parameters:
target
- The target writer to write toomax
-
- Returns:
- A GSPResponseWriter instance
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