Package org.apache.juneau.rest.util
Class FinishableServletOutputStream
java.lang.Object
java.io.OutputStream
jakarta.servlet.ServletOutputStream
org.apache.juneau.rest.util.FinishableServletOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
,Finishable
public class FinishableServletOutputStream
extends jakarta.servlet.ServletOutputStream
implements Finishable
A wrapped finish() method.
ServletOutputStream
with an added See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
close()
void
finish()
CallsFinishable.finish()
on the underlying output stream.final void
flush()
boolean
isReady()
void
setWriteListener
(jakarta.servlet.WriteListener arg0) final void
write
(byte[] b, int off, int len) final void
write
(int b) Methods inherited from class jakarta.servlet.ServletOutputStream
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
Constructor Details
-
FinishableServletOutputStream
Constructor.- Parameters:
os
- The wrapped output stream.
-
-
Method Details
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
isReady
- Specified by:
isReady
in classjakarta.servlet.ServletOutputStream
-
setWriteListener
- Specified by:
setWriteListener
in classjakarta.servlet.ServletOutputStream
-
finish
CallsFinishable.finish()
on the underlying output stream.A no-op if the underlying output stream does not implement the
Finishable
interface.- Specified by:
finish
in interfaceFinishable
- Throws:
IOException
- Thrown by underlying stream.
-