Refactor to have the logic in current() and nioBuffers()