Class ResponseWriter

java.lang.Object
java.io.Writer
java.io.PrintWriter
org.eclipse.jetty.ee10.servlet.ResponseWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public class ResponseWriter extends PrintWriter
Specialized PrintWriter for servlet Responses

An instance of ResponseWriter is the PrintWriter subclass returned by ServletResponse.getWriter(). It differs from the standard PrintWriter in that:

  • It does not support autoflush
  • The default Locale for format(String, Object...) is the locale obtained by ServletResponse.getLocale()
  • If a write or print method is called while checkError() returns true, then a RuntimeIOException is thrown to stop needless iterations.
  • The writer may be reopen to allow for recycling