参考代码:
http://blog.csdn.net/cyberzhg/article/details/6691094
http://blog.csdn.net/popopopolo/article/details/6451284
http://hi.baidu.com/xfqanjlskyfnpyr/item/4b95d68f3d9841d7d1f8cd05