add NioBuffer(not thread safe) and some minor changes