参考:
1.http://blog.csdn.net/suma_sun/article/details/50752528
2.这个更全面一点 : http://www.jb51.net/article/93706.htm