Add readn and writen for read/write n bytes.

Signed-off-by: YunchaoChen <ytu_cyc@126.com>