Package ortus.boxlang.web.util
Class BlockingBufferedOutputStream
java.lang.Object
java.io.OutputStream
ortus.boxlang.web.util.BlockingBufferedOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
A blocking buffered output stream that writes to a StreamSinkChannel.
We do not use the built-in BufferedOutputStream because it does not block when the channel is not writable.
-
Constructor Summary
ConstructorsConstructorDescriptionBlockingBufferedOutputStream(org.xnio.channels.StreamSinkChannel channel) Create a new BlockingBufferedOutputStream -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
Constructor Details
-
BlockingBufferedOutputStream
public BlockingBufferedOutputStream(org.xnio.channels.StreamSinkChannel channel) Create a new BlockingBufferedOutputStream- Parameters:
channel- The StreamSinkChannel
-
-
Method Details
-
write
Create a new BlockingBufferedOutputStream- Specified by:
writein classOutputStream- Throws:
IOException
-
write
Write a byte array to the output stream- Overrides:
writein classOutputStream- Parameters:
b- The byte array- Throws:
IOException
-
flush
Flush the output stream- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException- If an error occurs
-
close
Close the output stream- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException- If an error occurs
-