参考文章:
http://blog.csdn.net/luoshengyang/article/details/6621566
http://blog.csdn.net/jmq_0000/article/details/7349844