void prepareRead() throws IOException {
        if (mChannel.isBlocking()) {
            mChannel.configureBlocking(false);
        }
        mSelector.wakeup();
        mSelectionKey = mChannel.register(mSelector, SelectionKey.OP_READ, this);
    }
Read data from remote server and put it into the given buffer.

@param buffer A buffer to store data.
@return The read length.
@throws IOException if an I/O error occurs.
netbare-core/src/main/java/com/github/megatronking/netbare/tunnel/NioTunnel.java