boolean handleWrite() throws IOException {
		synchronized (this.bufferQueueMutex) {
			ByteBuffer buffer = this.bufferQueue.peek();
			while (buffer != null) {
				channelWrite(buffer);
				if (buffer.remaining() > 0) {
					return false; // Didn't finish this buffer. There's more to
									// send.
				} else {
					this.bufferQueue.poll(); // Buffer finished. Remove it.
					buffer = this.bufferQueue.peek();
				}
			}
			return true;
		}
	}