@Override public void transferFrom(FileChannel source) throws IOException { if (anyAreSet(state, FLAG_CLOSED)) { throw UndertowMessages.MESSAGES.streamIsClosed(); } if (buffer != null && buffer.position() != 0) { writeBufferBlocking(false); } if (channel == null) { channel = exchange.getResponseChannel(); } long position = source.position(); long size = source.size(); Channels.transferBlocking(channel, source, position, size); updateWritten(size - position); }
/** * {@inheritDoc} */ public void flush() throws IOException { if (anyAreSet(state, FLAG_CLOSED)) { throw UndertowMessages.MESSAGES.streamIsClosed(); } if (buffer != null && buffer.position() != 0) { writeBufferBlocking(false); } if (channel == null) { channel = exchange.getResponseChannel(); } Channels.flushBlocking(channel); }
buffer.put(b, off, len); if (buffer.remaining() == 0) { writeBufferBlocking(false); buffer.put(b, off, len); if (buffer.remaining() == 0) { writeBufferBlocking(false);
@Override public void transferFrom(FileChannel source) throws IOException { if (anyAreSet(state, FLAG_CLOSED)) { throw UndertowMessages.MESSAGES.streamIsClosed(); } if (buffer != null && buffer.position() != 0) { writeBufferBlocking(false); } if (channel == null) { channel = exchange.getResponseChannel(); } long position = source.position(); long size = source.size(); Channels.transferBlocking(channel, source, position, size); updateWritten(size - position); }
@Override public void transferFrom(FileChannel source) throws IOException { if (anyAreSet(state, FLAG_CLOSED)) { throw UndertowMessages.MESSAGES.streamIsClosed(); } if (buffer != null && buffer.position() != 0) { writeBufferBlocking(false); } if (channel == null) { channel = exchange.getResponseChannel(); } long position = source.position(); long size = source.size(); Channels.transferBlocking(channel, source, position, size); updateWritten(size - position); }
/** * {@inheritDoc} */ public void flush() throws IOException { if (anyAreSet(state, FLAG_CLOSED)) { throw UndertowMessages.MESSAGES.streamIsClosed(); } if (buffer != null && buffer.position() != 0) { writeBufferBlocking(false); } if (channel == null) { channel = exchange.getResponseChannel(); } Channels.flushBlocking(channel); }
/** * {@inheritDoc} */ public void flush() throws IOException { if (anyAreSet(state, FLAG_CLOSED)) { throw UndertowMessages.MESSAGES.streamIsClosed(); } if (buffer != null && buffer.position() != 0) { writeBufferBlocking(false); } if (channel == null) { channel = exchange.getResponseChannel(); } Channels.flushBlocking(channel); }
buffer.put(b, off, len); if (buffer.remaining() == 0) { writeBufferBlocking(false); buffer.put(b, off, len); if (buffer.remaining() == 0) { writeBufferBlocking(false);
buffer.put(b, off, len); if (buffer.remaining() == 0) { writeBufferBlocking(false); buffer.put(b, off, len); if (buffer.remaining() == 0) { writeBufferBlocking(false);