/** * Read a sequence of bytes in non-blocking mode from he current channel * * @param bb the byte buffer which will contain the bytes read from the current channel */ private void nonBlockingRead(final ByteBuffer bb, long timeout, TimeUnit unit) { final NioChannel ch = this.channel; try { ch.read(bb, ch, this.completionHandler); } catch (Throwable t) { if (log.isDebugEnabled()) { log.debug("An error occurs when trying a non-blocking read ", t); } } }