一, 参考文章:

      1, http://blog.csdn.net/communicate_/article/details/8644040

        这篇文章讲的还算详尽,但是貌似有一些多余的代码;

      2,