Package org.apache.catalina.filters
Class ExpiresFilter.XServletOutputStream
java.lang.Object
java.io.OutputStream
javax.servlet.ServletOutputStream
org.apache.catalina.filters.ExpiresFilter.XServletOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Enclosing class:
- ExpiresFilter
Wrapping extension of
ServletOutputStream
to trap the "Start Write Response Body" event.-
Constructor Summary
ConstructorDescriptionXServletOutputStream
(ServletOutputStream servletOutputStream, HttpServletRequest request, ExpiresFilter.XHttpServletResponse response) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
flush()
boolean
isReady()
TODO SERVLET 3.1void
print
(boolean b) Writes aboolean
value to the client, with no carriage return-line feed (CRLF) character at the end.void
print
(char c) Writes a character to the client, with no carriage return-line feed (CRLF) at the end.void
print
(double d) Writes adouble
value to the client, with no carriage return-line feed (CRLF) at the end.void
print
(float f) Writes afloat
value to the client, with no carriage return-line feed (CRLF) at the end.void
print
(int i) Writes an int to the client, with no carriage return-line feed (CRLF) at the end.void
print
(long l) Writes along
value to the client, with no carriage return-line feed (CRLF) at the end.void
Writes aString
to the client, without a carriage return-line feed (CRLF) character at the end.void
println()
Writes a carriage return-line feed (CRLF) to the client.void
println
(boolean b) Writes aboolean
value to the client, followed by a carriage return-line feed (CRLF).void
println
(char c) Writes a character to the client, followed by a carriage return-line feed (CRLF).void
println
(double d) Writes adouble
value to the client, followed by a carriage return-line feed (CRLF).void
println
(float f) Writes afloat
value to the client, followed by a carriage return-line feed (CRLF).void
println
(int i) Writes an int to the client, followed by a carriage return-line feed (CRLF) character.void
println
(long l) Writes along
value to the client, followed by a carriage return-line feed (CRLF).void
Writes aString
to the client, followed by a carriage return-line feed (CRLF).void
setWriteListener
(WriteListener listener) TODO SERVLET 3.1void
write
(byte[] b) void
write
(byte[] b, int off, int len) void
write
(int b) Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
XServletOutputStream
public XServletOutputStream(ServletOutputStream servletOutputStream, HttpServletRequest request, ExpiresFilter.XHttpServletResponse response)
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
print
Description copied from class:javax.servlet.ServletOutputStream
Writes aboolean
value to the client, with no carriage return-line feed (CRLF) character at the end.- Overrides:
print
in classServletOutputStream
- Parameters:
b
- theboolean
value to send to the client- Throws:
IOException
- if an input or output exception occurred
-
print
Description copied from class:javax.servlet.ServletOutputStream
Writes a character to the client, with no carriage return-line feed (CRLF) at the end.- Overrides:
print
in classServletOutputStream
- Parameters:
c
- the character to send to the client- Throws:
IOException
- if an input or output exception occurred
-
print
Description copied from class:javax.servlet.ServletOutputStream
Writes adouble
value to the client, with no carriage return-line feed (CRLF) at the end.- Overrides:
print
in classServletOutputStream
- Parameters:
d
- thedouble
value to send to the client- Throws:
IOException
- if an input or output exception occurred
-
print
Description copied from class:javax.servlet.ServletOutputStream
Writes afloat
value to the client, with no carriage return-line feed (CRLF) at the end.- Overrides:
print
in classServletOutputStream
- Parameters:
f
- thefloat
value to send to the client- Throws:
IOException
- if an input or output exception occurred
-
print
Description copied from class:javax.servlet.ServletOutputStream
Writes an int to the client, with no carriage return-line feed (CRLF) at the end.- Overrides:
print
in classServletOutputStream
- Parameters:
i
- the int to send to the client- Throws:
IOException
- if an input or output exception occurred
-
print
Description copied from class:javax.servlet.ServletOutputStream
Writes along
value to the client, with no carriage return-line feed (CRLF) at the end.- Overrides:
print
in classServletOutputStream
- Parameters:
l
- thelong
value to send to the client- Throws:
IOException
- if an input or output exception occurred
-
print
Description copied from class:javax.servlet.ServletOutputStream
Writes aString
to the client, without a carriage return-line feed (CRLF) character at the end.- Overrides:
print
in classServletOutputStream
- Parameters:
s
- theString
to send to the client- Throws:
IOException
- if an input or output exception occurred
-
println
Description copied from class:javax.servlet.ServletOutputStream
Writes a carriage return-line feed (CRLF) to the client.- Overrides:
println
in classServletOutputStream
- Throws:
IOException
- if an input or output exception occurred
-
println
Description copied from class:javax.servlet.ServletOutputStream
Writes aboolean
value to the client, followed by a carriage return-line feed (CRLF).- Overrides:
println
in classServletOutputStream
- Parameters:
b
- theboolean
value to write to the client- Throws:
IOException
- if an input or output exception occurred
-
println
Description copied from class:javax.servlet.ServletOutputStream
Writes a character to the client, followed by a carriage return-line feed (CRLF).- Overrides:
println
in classServletOutputStream
- Parameters:
c
- the character to write to the client- Throws:
IOException
- if an input or output exception occurred
-
println
Description copied from class:javax.servlet.ServletOutputStream
Writes adouble
value to the client, followed by a carriage return-line feed (CRLF).- Overrides:
println
in classServletOutputStream
- Parameters:
d
- thedouble
value to write to the client- Throws:
IOException
- if an input or output exception occurred
-
println
Description copied from class:javax.servlet.ServletOutputStream
Writes afloat
value to the client, followed by a carriage return-line feed (CRLF).- Overrides:
println
in classServletOutputStream
- Parameters:
f
- thefloat
value to write to the client- Throws:
IOException
- if an input or output exception occurred
-
println
Description copied from class:javax.servlet.ServletOutputStream
Writes an int to the client, followed by a carriage return-line feed (CRLF) character.- Overrides:
println
in classServletOutputStream
- Parameters:
i
- the int to write to the client- Throws:
IOException
- if an input or output exception occurred
-
println
Description copied from class:javax.servlet.ServletOutputStream
Writes along
value to the client, followed by a carriage return-line feed (CRLF).- Overrides:
println
in classServletOutputStream
- Parameters:
l
- thelong
value to write to the client- Throws:
IOException
- if an input or output exception occurred
-
println
Description copied from class:javax.servlet.ServletOutputStream
Writes aString
to the client, followed by a carriage return-line feed (CRLF).- Overrides:
println
in classServletOutputStream
- Parameters:
s
- theString
to write to the client- Throws:
IOException
- if an input or output exception occurred
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
isReady
public boolean isReady()TODO SERVLET 3.1- Specified by:
isReady
in classServletOutputStream
- Returns:
true
if data can be written, elsefalse
-
setWriteListener
TODO SERVLET 3.1- Specified by:
setWriteListener
in classServletOutputStream
- Parameters:
listener
- The non-blocking IO write listener
-