Package org.eclipse.jetty.ee10.servlet
Class ResponseWriter
java.lang.Object
java.io.Writer
java.io.PrintWriter
org.eclipse.jetty.ee10.servlet.ResponseWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
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 byServletResponse.getLocale()
- If a write or print method is called while
checkError()
returns true, then aRuntimeIOException
is thrown to stop needless iterations. - The writer may be reopen to allow for recycling
-
Field Summary
Fields inherited from class java.io.PrintWriter
out
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
protected void
void
close()
void
flush()
boolean
void
print
(boolean b) void
print
(char c) void
print
(char[] s) void
print
(double d) void
print
(float f) void
print
(int i) void
print
(long l) void
void
void
println()
void
println
(boolean b) void
println
(char c) void
println
(char[] s) void
println
(double x) void
println
(float x) void
println
(int x) void
println
(long x) void
void
void
reopen()
protected void
setError()
void
write
(char[] buf) void
write
(char[] buf, int off, int len) void
write
(int c) void
void
Methods inherited from class java.io.PrintWriter
append, append, append
Methods inherited from class java.io.Writer
nullWriter
-
Constructor Details
-
ResponseWriter
-
-
Method Details
-
isFor
-
reopen
public void reopen() -
clearError
protected void clearError()- Overrides:
clearError
in classPrintWriter
-
checkError
public boolean checkError()- Overrides:
checkError
in classPrintWriter
-
setError
protected void setError()- Overrides:
setError
in classPrintWriter
-
flush
public void flush()- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classPrintWriter
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classPrintWriter
-
write
public void write(int c) - Overrides:
write
in classPrintWriter
-
write
public void write(char[] buf, int off, int len) - Overrides:
write
in classPrintWriter
-
write
public void write(char[] buf) - Overrides:
write
in classPrintWriter
-
write
- Overrides:
write
in classPrintWriter
-
write
- Overrides:
write
in classPrintWriter
-
print
public void print(boolean b) - Overrides:
print
in classPrintWriter
-
print
public void print(char c) - Overrides:
print
in classPrintWriter
-
print
public void print(int i) - Overrides:
print
in classPrintWriter
-
print
public void print(long l) - Overrides:
print
in classPrintWriter
-
print
public void print(float f) - Overrides:
print
in classPrintWriter
-
print
public void print(double d) - Overrides:
print
in classPrintWriter
-
print
public void print(char[] s) - Overrides:
print
in classPrintWriter
-
print
- Overrides:
print
in classPrintWriter
-
print
- Overrides:
print
in classPrintWriter
-
println
public void println()- Overrides:
println
in classPrintWriter
-
println
public void println(boolean b) - Overrides:
println
in classPrintWriter
-
println
public void println(char c) - Overrides:
println
in classPrintWriter
-
println
public void println(int x) - Overrides:
println
in classPrintWriter
-
println
public void println(long x) - Overrides:
println
in classPrintWriter
-
println
public void println(float x) - Overrides:
println
in classPrintWriter
-
println
public void println(double x) - Overrides:
println
in classPrintWriter
-
println
public void println(char[] s) - Overrides:
println
in classPrintWriter
-
println
- Overrides:
println
in classPrintWriter
-
println
- Overrides:
println
in classPrintWriter
-
printf
- Overrides:
printf
in classPrintWriter
-
printf
- Overrides:
printf
in classPrintWriter
-
format
- Overrides:
format
in classPrintWriter
-
format
- Overrides:
format
in classPrintWriter
-