Class ExpiresFilter.XServletOutputStream
java.lang.Object
java.io.OutputStream
jakarta.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 SummaryConstructorsConstructorDescriptionXServletOutputStream(ServletOutputStream servletOutputStream, HttpServletRequest request, ExpiresFilter.XHttpServletResponse response) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()voidflush()booleanisReady()TODO SERVLET 3.1voidprint(boolean b) Writes abooleanvalue to the client, with no carriage return-line feed (CRLF) character at the end.voidprint(char c) Writes a character to the client, with no carriage return-line feed (CRLF) at the end.voidprint(double d) Writes adoublevalue to the client, with no carriage return-line feed (CRLF) at the end.voidprint(float f) Writes afloatvalue to the client, with no carriage return-line feed (CRLF) at the end.voidprint(int i) Writes an int to the client, with no carriage return-line feed (CRLF) at the end.voidprint(long l) Writes alongvalue to the client, with no carriage return-line feed (CRLF) at the end.voidWrites aStringto the client, without a carriage return-line feed (CRLF) character at the end.voidprintln()Writes a carriage return-line feed (CRLF) to the client.voidprintln(boolean b) Writes abooleanvalue to the client, followed by a carriage return-line feed (CRLF).voidprintln(char c) Writes a character to the client, followed by a carriage return-line feed (CRLF).voidprintln(double d) Writes adoublevalue to the client, followed by a carriage return-line feed (CRLF).voidprintln(float f) Writes afloatvalue to the client, followed by a carriage return-line feed (CRLF).voidprintln(int i) Writes an int to the client, followed by a carriage return-line feed (CRLF) character.voidprintln(long l) Writes alongvalue to the client, followed by a carriage return-line feed (CRLF).voidWrites aStringto the client, followed by a carriage return-line feed (CRLF).voidsetWriteListener(WriteListener listener) TODO SERVLET 3.1voidwrite(byte[] b) voidwrite(byte[] b, int off, int len) voidwrite(int b) Methods inherited from class jakarta.servlet.ServletOutputStreamwriteMethods inherited from class java.io.OutputStreamnullOutputStream
- 
Constructor Details- 
XServletOutputStreampublic XServletOutputStream(ServletOutputStream servletOutputStream, HttpServletRequest request, ExpiresFilter.XHttpServletResponse response) 
 
- 
- 
Method Details- 
closeDescription copied from class:jakarta.servlet.ServletOutputStreamIf this method is called when the output stream is in non-blocking mode, it will immediately return with the stream effectively closed, even if the stream contains buffered data that is yet to be written to client. The container will write this data out in the background. If this process fails the WriteListener.onError(Throwable)method will be invoked as normal.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- ServletOutputStream
- Throws:
- IOException
 
- 
flush- Specified by:
- flushin interface- Flushable
- Overrides:
- flushin class- OutputStream
- Throws:
- IOException
 
- 
printDescription copied from class:jakarta.servlet.ServletOutputStreamWrites abooleanvalue to the client, with no carriage return-line feed (CRLF) character at the end.- Overrides:
- printin class- ServletOutputStream
- Parameters:
- b- the- booleanvalue to send to the client
- Throws:
- IOException- if an input or output exception occurred
 
- 
printDescription copied from class:jakarta.servlet.ServletOutputStreamWrites a character to the client, with no carriage return-line feed (CRLF) at the end.- Overrides:
- printin class- ServletOutputStream
- Parameters:
- c- the character to send to the client
- Throws:
- IOException- if an input or output exception occurred
 
- 
printDescription copied from class:jakarta.servlet.ServletOutputStreamWrites adoublevalue to the client, with no carriage return-line feed (CRLF) at the end.- Overrides:
- printin class- ServletOutputStream
- Parameters:
- d- the- doublevalue to send to the client
- Throws:
- IOException- if an input or output exception occurred
 
- 
printDescription copied from class:jakarta.servlet.ServletOutputStreamWrites afloatvalue to the client, with no carriage return-line feed (CRLF) at the end.- Overrides:
- printin class- ServletOutputStream
- Parameters:
- f- the- floatvalue to send to the client
- Throws:
- IOException- if an input or output exception occurred
 
- 
printDescription copied from class:jakarta.servlet.ServletOutputStreamWrites an int to the client, with no carriage return-line feed (CRLF) at the end.- Overrides:
- printin class- ServletOutputStream
- Parameters:
- i- the int to send to the client
- Throws:
- IOException- if an input or output exception occurred
 
- 
printDescription copied from class:jakarta.servlet.ServletOutputStreamWrites alongvalue to the client, with no carriage return-line feed (CRLF) at the end.- Overrides:
- printin class- ServletOutputStream
- Parameters:
- l- the- longvalue to send to the client
- Throws:
- IOException- if an input or output exception occurred
 
- 
printDescription copied from class:jakarta.servlet.ServletOutputStreamWrites aStringto the client, without a carriage return-line feed (CRLF) character at the end.- Overrides:
- printin class- ServletOutputStream
- Parameters:
- s- the- Stringto send to the client
- Throws:
- IOException- if an input or output exception occurred
 
- 
printlnDescription copied from class:jakarta.servlet.ServletOutputStreamWrites a carriage return-line feed (CRLF) to the client.- Overrides:
- printlnin class- ServletOutputStream
- Throws:
- IOException- if an input or output exception occurred
 
- 
printlnDescription copied from class:jakarta.servlet.ServletOutputStreamWrites abooleanvalue to the client, followed by a carriage return-line feed (CRLF).- Overrides:
- printlnin class- ServletOutputStream
- Parameters:
- b- the- booleanvalue to write to the client
- Throws:
- IOException- if an input or output exception occurred
 
- 
printlnDescription copied from class:jakarta.servlet.ServletOutputStreamWrites a character to the client, followed by a carriage return-line feed (CRLF).- Overrides:
- printlnin class- ServletOutputStream
- Parameters:
- c- the character to write to the client
- Throws:
- IOException- if an input or output exception occurred
 
- 
printlnDescription copied from class:jakarta.servlet.ServletOutputStreamWrites adoublevalue to the client, followed by a carriage return-line feed (CRLF).- Overrides:
- printlnin class- ServletOutputStream
- Parameters:
- d- the- doublevalue to write to the client
- Throws:
- IOException- if an input or output exception occurred
 
- 
printlnDescription copied from class:jakarta.servlet.ServletOutputStreamWrites afloatvalue to the client, followed by a carriage return-line feed (CRLF).- Overrides:
- printlnin class- ServletOutputStream
- Parameters:
- f- the- floatvalue to write to the client
- Throws:
- IOException- if an input or output exception occurred
 
- 
printlnDescription copied from class:jakarta.servlet.ServletOutputStreamWrites an int to the client, followed by a carriage return-line feed (CRLF) character.- Overrides:
- printlnin class- ServletOutputStream
- Parameters:
- i- the int to write to the client
- Throws:
- IOException- if an input or output exception occurred
 
- 
printlnDescription copied from class:jakarta.servlet.ServletOutputStreamWrites alongvalue to the client, followed by a carriage return-line feed (CRLF).- Overrides:
- printlnin class- ServletOutputStream
- Parameters:
- l- the- longvalue to write to the client
- Throws:
- IOException- if an input or output exception occurred
 
- 
printlnDescription copied from class:jakarta.servlet.ServletOutputStreamWrites aStringto the client, followed by a carriage return-line feed (CRLF).- Overrides:
- printlnin class- ServletOutputStream
- Parameters:
- s- the- Stringto write to the client
- Throws:
- IOException- if an input or output exception occurred
 
- 
write- Overrides:
- writein class- OutputStream
- Throws:
- IOException
 
- 
write- Overrides:
- writein class- OutputStream
- Throws:
- IOException
 
- 
write- Specified by:
- writein class- OutputStream
- Throws:
- IOException
 
- 
isReadypublic boolean isReady()TODO SERVLET 3.1- Specified by:
- isReadyin class- ServletOutputStream
- Returns:
- trueif data can be written without blocking, otherwise returns- false.
 
- 
setWriteListenerTODO SERVLET 3.1- Specified by:
- setWriteListenerin class- ServletOutputStream
- Parameters:
- listener- The non-blocking IO write listener
 
 
-