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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclose()voidfinish()CallsFinishable.finish()on the underlying output stream.final voidflush()booleanisReady()voidsetWriteListener(jakarta.servlet.WriteListener arg0) final voidwrite(byte[] b, int off, int len) final voidwrite(int b) Methods inherited from class jakarta.servlet.ServletOutputStream
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, writeMethods inherited from class java.io.OutputStream
nullOutputStream, write
-
Constructor Details
-
FinishableServletOutputStream
Constructor.- Parameters:
os- The wrapped output stream.
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classjakarta.servlet.ServletOutputStream- Throws:
IOException
-
finish
CallsFinishable.finish()on the underlying output stream.A no-op if the underlying output stream does not implement the
Finishableinterface.- Specified by:
finishin interfaceFinishable- Throws:
IOException- Thrown by underlying stream.
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
isReady
- Specified by:
isReadyin classjakarta.servlet.ServletOutputStream
-
setWriteListener
- Specified by:
setWriteListenerin classjakarta.servlet.ServletOutputStream
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-