public class InternalNioOutputBuffer extends AbstractOutputBuffer<NioChannel>
| Modifier and Type | Class and Description |
|---|---|
protected class |
InternalNioOutputBuffer.SocketOutputBuffer
This class is an output buffer which will write data to an output
stream.
|
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
flipped
Track if the byte buffer is flipped
|
activeFilters, bufferedWrites, bufferedWriteSize, byteCount, committed, filterLibrary, finished, headerBuffer, lastActiveFilter, outputStreamOutputBuffer, pos, response, sm, socketBuffer| Constructor and Description |
|---|
InternalNioOutputBuffer(Response response,
int headerBufferSize)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
commit()
Commit the response.
|
protected boolean |
flushBuffer(boolean block)
Callback to write data from the buffer.
|
protected boolean |
hasMoreDataToFlush() |
void |
init(SocketWrapper<NioChannel> socketWrapper,
AbstractEndpoint<NioChannel> endpoint) |
void |
recycle()
Recycle the output buffer.
|
protected void |
registerWriteInterest() |
void |
sendAck()
Send an acknowledgment.
|
addActiveFilter, addFilter, doWrite, endHeaders, endRequest, flush, getBufferedWriteSize, getBytesWritten, getFilters, getSocketBuffer, hasBufferedData, hasDataToWrite, isBlocking, isReady, nextRequest, reset, sendHeader, sendStatus, setBufferedWriteSize, setSocketBuffer, write, write, write, write, writepublic InternalNioOutputBuffer(Response response, int headerBufferSize)
public void init(SocketWrapper<NioChannel> socketWrapper, AbstractEndpoint<NioChannel> endpoint) throws java.io.IOException
init in class AbstractOutputBuffer<NioChannel>java.io.IOExceptionpublic void recycle()
recycle in class AbstractOutputBuffer<NioChannel>public void sendAck()
throws java.io.IOException
sendAck in class AbstractOutputBuffer<NioChannel>java.io.IOExceptionprotected void commit()
throws java.io.IOException
commit in class AbstractOutputBuffer<NioChannel>java.io.IOException - an underlying I/O error occurredprotected boolean flushBuffer(boolean block)
throws java.io.IOException
flushBuffer in class AbstractOutputBuffer<NioChannel>block - Should this method block until the buffer is emptytrue if data remains in the buffer (which can only
happen in non-blocking mode) else false.java.io.IOExceptionprotected boolean hasMoreDataToFlush()
hasMoreDataToFlush in class AbstractOutputBuffer<NioChannel>protected void registerWriteInterest()
throws java.io.IOException
registerWriteInterest in class AbstractOutputBuffer<NioChannel>java.io.IOExceptionCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.