参考链接
http://www.cnblogs.com/wean/archive/2012/05/16/2502724.html
http://www.cnblogs.com/hoojo/archive/2012/07/12/2587556.html