Package org.omnifaces.io
Class DefaultServletOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- jakarta.servlet.ServletOutputStream
-
- org.omnifaces.io.DefaultServletOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class DefaultServletOutputStream extends ServletOutputStream
A default implementation of abstract servlet output stream.
- Since:
- 2.6
- Author:
- Bauke Scholtz
-
-
Constructor Summary
Constructors Constructor Description DefaultServletOutputStream(OutputStream output)
Constructs a default servlet output stream which delegates to given output stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
boolean
isReady()
void
setWriteListener(WriteListener listener)
void
write(byte[] bytes)
void
write(byte[] bytes, int offset, int length)
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
-
-
-
-
Constructor Detail
-
DefaultServletOutputStream
public DefaultServletOutputStream(OutputStream output)
Constructs a default servlet output stream which delegates to given output stream.- Parameters:
output
- The output stream to let this servlet output stream delegate to.
-
-
Method Detail
-
setWriteListener
public void setWriteListener(WriteListener listener)
- Specified by:
setWriteListener
in classServletOutputStream
-
isReady
public boolean isReady()
- Specified by:
isReady
in classServletOutputStream
-
write
public void write(int b) throws IOException
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] bytes) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] bytes, int offset, int length) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
-