http://blog.csdn.net/jaminwm/article/details/7183773 编码CODE: http://blog.csdn.net/xiongchao2011/article/details/7276834