refactor nio write
optimized write() just  conceptual demo,maybe can't run
1. Write() use ByteBuffer rather than byte[]
2. avoid many times wakeup()
3. try direct write other rather than add to the queue and wait write event