Read and write integer.

Signed-off-by: CyberZHG <CyberZHG@gmail.com>