public class SimpleIoOutputStream extends AbstractCloseable implements IoOutputStream
IoOutputStream using a synchronous ChannelOutputStream.| Modifier and Type | Class and Description |
|---|---|
protected static class |
SimpleIoOutputStream.DefaultIoWriteFuture |
AbstractCloseable.State| Modifier and Type | Field and Description |
|---|---|
protected ChannelOutputStream |
os |
closeFuture, futureLock, statelog| Constructor and Description |
|---|
SimpleIoOutputStream(ChannelOutputStream os) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doCloseImmediately()
doCloseImmediately is called once and only once with state == Immediate
|
IoWriteFuture |
writeBuffer(Buffer buffer)
Write the given buffer.
|
addCloseFutureListener, builder, close, doCloseGracefully, getFutureLock, isClosed, isClosing, preClose, removeCloseFutureListenerdebug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenerprotected final ChannelOutputStream os
public SimpleIoOutputStream(ChannelOutputStream os)
protected void doCloseImmediately()
AbstractCloseabledoCloseImmediately is called once and only once with state == Immediate
Overriding methods should always call the base implementation. It may be called concurrently while preClose() or doCloseGracefully is executing
doCloseImmediately in class AbstractCloseablepublic IoWriteFuture writeBuffer(Buffer buffer) throws IOException
IoOutputStreamwriteBuffer in interface IoOutputStreambuffer - the data to write. NOTE: the buffer must not be touched until the returned write
future is completed.IoWriteFuture that can be used to check when the data has actually been written.IOException - if an error occurred when writing the dataCopyright © 2008–2024 The Apache Software Foundation. All rights reserved.