this lib is copy from http://alxw4616.iteye.com/blog/2056296. I upload it here for remember and mark it .