Asserts.notNull(this.bbuf, "Byte buffer");
//FIXME: IOControl needs to expose event mask in order to avoid this extreme ugliness
final IOSession iosession;
if (ioctrl instanceof ManagedNHttpClientConnection) {
final ManagedNHttpClientConnection conn = (ManagedNHttpClientConnection) ioctrl;
iosession = conn != null ? conn.getIOSession() : null;
} else {
iosession = null;
}
while (!this.isDone()) {
final int bytesRead = decoder.read(this.bbuf);