if (mDebug) before = OzUtil.toString(data);
int req = 0; if (mDebug) before = OzUtil.toString(data); if (mDebug) req = data.remaining();
        private void processPendingWrites() throws IOException {        	synchronized (mLock) {        		int totalWritten = 0;        		boolean allWritten = true;        		for (Iterator<ByteBuffer> iter = mWriteBuffers.iterator(); iter.hasNext(); iter.remove()) {        			ByteBuffer data = iter.next();        			assert(data != null);        			assert(data.hasRemaining());        			                    String before = null;                    if (mDebug) before = OzUtil.toString(data);                    if (mTrace) mLog.trace(OzUtil.byteBufferDebugDump("channel write buffer", data, false));        			int wrote = mChannel.write(data);        			totalWritten += wrote;                    if (mDebug) mLog.debug("channel wrote=" + wrote + " partial=" + data.hasRemaining() + " total=" + totalWritten + " buffer: " + before + "->" + OzUtil.toString(data));                            			if (data.hasRemaining()) {        				// Not all data was written. Enable write interest so we                        // can write later.        				allWritten = false;        				enableWriteInterest();        				break;        			}        		}        		        		if (allWritten) {        			if (mCloseAfterWrite) {        				cleanupChannel(CleanupReason.NORMAL);        			}                            			synchronized (mLock) {        				mLock.notifyAll();        			}        		}                    	}        		        }