﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-yeafee@夜飞郎-随笔分类-程序语言</title><link>http://www.blogjava.net/yeafee/category/6082.html</link><description>           it's usually better to solve problems with simplicity and finesse rather than muscle.</description><language>zh-cn</language><lastBuildDate>Tue, 24 May 2011 06:03:46 GMT</lastBuildDate><pubDate>Tue, 24 May 2011 06:03:46 GMT</pubDate><ttl>60</ttl><item><title>Java除法运算的陷阱</title><link>http://www.blogjava.net/yeafee/archive/2011/05/24/350911.html</link><dc:creator>@yeafee</dc:creator><author>@yeafee</author><pubDate>Tue, 24 May 2011 05:21:00 GMT</pubDate><guid>http://www.blogjava.net/yeafee/archive/2011/05/24/350911.html</guid><wfw:comment>http://www.blogjava.net/yeafee/comments/350911.html</wfw:comment><comments>http://www.blogjava.net/yeafee/archive/2011/05/24/350911.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yeafee/comments/commentRss/350911.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yeafee/services/trackbacks/350911.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 陷阱：<br>零在整数预算中不可以做除数，否则抛运行时异常。<br>零在浮点运算中可以做除数，返回值为无穷大。<br>NaN各不相同，可看做是Java设计上的一个缺陷。<br>浮点型（Float或Double）的除法运算可以接受任何数值，并且结果总是返回一个浮点型的数值。这个数值可能是不合法的，需要进行判断和验证。&nbsp;&nbsp;<a href='http://www.blogjava.net/yeafee/archive/2011/05/24/350911.html'>阅读全文</a><img src ="http://www.blogjava.net/yeafee/aggbug/350911.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yeafee/" target="_blank">@yeafee</a> 2011-05-24 13:21 <a href="http://www.blogjava.net/yeafee/archive/2011/05/24/350911.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Abstract Class And Interface abstract class</title><link>http://www.blogjava.net/yeafee/archive/2010/02/09/312427.html</link><dc:creator>@yeafee</dc:creator><author>@yeafee</author><pubDate>Tue, 09 Feb 2010 08:07:00 GMT</pubDate><guid>http://www.blogjava.net/yeafee/archive/2010/02/09/312427.html</guid><wfw:comment>http://www.blogjava.net/yeafee/comments/312427.html</wfw:comment><comments>http://www.blogjava.net/yeafee/archive/2010/02/09/312427.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yeafee/comments/commentRss/312427.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yeafee/services/trackbacks/312427.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: abstract class 和 interface 区别开来还是容易的。只要弄清楚描述对象本质和抽象概念的关系就好区分了。当描述对象本质和抽象概念是"is-a"关系时使用abstract来抽象描述对象；当描述对象本质和抽象概念是"like-a"关系时使用interface来抽象该对象。<br>&nbsp;&nbsp;<a href='http://www.blogjava.net/yeafee/archive/2010/02/09/312427.html'>阅读全文</a><img src ="http://www.blogjava.net/yeafee/aggbug/312427.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yeafee/" target="_blank">@yeafee</a> 2010-02-09 16:07 <a href="http://www.blogjava.net/yeafee/archive/2010/02/09/312427.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JS: CheckBox 全选  </title><link>http://www.blogjava.net/yeafee/archive/2007/12/03/164890.html</link><dc:creator>@yeafee</dc:creator><author>@yeafee</author><pubDate>Mon, 03 Dec 2007 07:38:00 GMT</pubDate><guid>http://www.blogjava.net/yeafee/archive/2007/12/03/164890.html</guid><wfw:comment>http://www.blogjava.net/yeafee/comments/164890.html</wfw:comment><comments>http://www.blogjava.net/yeafee/archive/2007/12/03/164890.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yeafee/comments/commentRss/164890.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yeafee/services/trackbacks/164890.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: JS  CheckBOX  全选 &nbsp;&nbsp;<a href='http://www.blogjava.net/yeafee/archive/2007/12/03/164890.html'>阅读全文</a><img src ="http://www.blogjava.net/yeafee/aggbug/164890.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yeafee/" target="_blank">@yeafee</a> 2007-12-03 15:38 <a href="http://www.blogjava.net/yeafee/archive/2007/12/03/164890.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>一段分页处理总结(JS数据加减)</title><link>http://www.blogjava.net/yeafee/archive/2007/06/10/123260.html</link><dc:creator>@yeafee</dc:creator><author>@yeafee</author><pubDate>Sun, 10 Jun 2007 15:14:00 GMT</pubDate><guid>http://www.blogjava.net/yeafee/archive/2007/06/10/123260.html</guid><wfw:comment>http://www.blogjava.net/yeafee/comments/123260.html</wfw:comment><comments>http://www.blogjava.net/yeafee/archive/2007/06/10/123260.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/yeafee/comments/commentRss/123260.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yeafee/services/trackbacks/123260.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要:      本文实现了一个WEB程序分页功能,所有的页面转向,通过调用一个JS函数来实现.getServerList(p1,p2,p3,p4),其中传递四个参数,分别表示页面转向eg.previous,next,last;当前页;所有页;所有记录数;在处理分页的程序代码中,主要来处理参数p1.根据p1的不同,实现获取不同页面数据.&nbsp;&nbsp;<a href='http://www.blogjava.net/yeafee/archive/2007/06/10/123260.html'>阅读全文</a><img src ="http://www.blogjava.net/yeafee/aggbug/123260.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yeafee/" target="_blank">@yeafee</a> 2007-06-10 23:14 <a href="http://www.blogjava.net/yeafee/archive/2007/06/10/123260.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JSP中include指令和include行为区别(转)</title><link>http://www.blogjava.net/yeafee/archive/2007/06/05/122075.html</link><dc:creator>@yeafee</dc:creator><author>@yeafee</author><pubDate>Tue, 05 Jun 2007 02:35:00 GMT</pubDate><guid>http://www.blogjava.net/yeafee/archive/2007/06/05/122075.html</guid><wfw:comment>http://www.blogjava.net/yeafee/comments/122075.html</wfw:comment><comments>http://www.blogjava.net/yeafee/archive/2007/06/05/122075.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yeafee/comments/commentRss/122075.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yeafee/services/trackbacks/122075.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 一:执行时间上:<br><%@ include file=”relativeURI”%> 是在翻译阶段执行<br><jsp:include page=”relativeURI” flush=”true” /> 在请求处理阶段执行.<br>二:引入内容的不同:<br><%@ include file=”relativeURI”%><br>引入静态文本(html,jsp),在JSP页面被转化成servlet之前和它融和到一起.<br><jsp:include page="relativeURI" flush="true" />引入执行页面或servlet所生成的应答文本.&nbsp;&nbsp;<a href='http://www.blogjava.net/yeafee/archive/2007/06/05/122075.html'>阅读全文</a><img src ="http://www.blogjava.net/yeafee/aggbug/122075.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yeafee/" target="_blank">@yeafee</a> 2007-06-05 10:35 <a href="http://www.blogjava.net/yeafee/archive/2007/06/05/122075.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Java 数据类型互换byte</title><link>http://www.blogjava.net/yeafee/archive/2007/04/16/111010.html</link><dc:creator>@yeafee</dc:creator><author>@yeafee</author><pubDate>Mon, 16 Apr 2007 08:32:00 GMT</pubDate><guid>http://www.blogjava.net/yeafee/archive/2007/04/16/111010.html</guid><wfw:comment>http://www.blogjava.net/yeafee/comments/111010.html</wfw:comment><comments>http://www.blogjava.net/yeafee/archive/2007/04/16/111010.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yeafee/comments/commentRss/111010.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yeafee/services/trackbacks/111010.html</trackback:ping><description><![CDATA[
		<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;">
				<!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>-->
				<span style="color: rgb(0, 128, 128);">  1</span> <span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);"> TypeConvert {<br /></span><span style="color: rgb(0, 128, 128);">  2</span> <span style="color: rgb(0, 0, 0);">     <br /></span><span style="color: rgb(0, 128, 128);">  3</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">  4</span> <span style="color: rgb(0, 128, 0);">     * 整数到字节数组的转换<br /></span><span style="color: rgb(0, 128, 128);">  5</span> <span style="color: rgb(0, 128, 0);">     </span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">  6</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] intToByte(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> number) {<br /></span><span style="color: rgb(0, 128, 128);">  7</span> <span style="color: rgb(0, 0, 0);">        <br /></span><span style="color: rgb(0, 128, 128);">  8</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> temp </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> number;<br /></span><span style="color: rgb(0, 128, 128);">  9</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] b </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">4</span><span style="color: rgb(0, 0, 0);">];<br /></span><span style="color: rgb(0, 128, 128);"> 10</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> i </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> b.length </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">; i </span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">; i</span><span style="color: rgb(0, 0, 0);">--</span><span style="color: rgb(0, 0, 0);">) {<br /></span><span style="color: rgb(0, 128, 128);"> 11</span> <span style="color: rgb(0, 0, 0);">            b[i] </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> Integer(temp </span><span style="color: rgb(0, 0, 0);">&amp;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0xff</span><span style="color: rgb(0, 0, 0);">).byteValue(); </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> 将最高位保存在最低位</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 12</span> <span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">            temp </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> temp </span><span style="color: rgb(0, 0, 0);">&gt;&gt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">8</span><span style="color: rgb(0, 0, 0);">; </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> 向右移8位</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 13</span> <span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">        }<br /></span><span style="color: rgb(0, 128, 128);"> 14</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> b;<br /></span><span style="color: rgb(0, 128, 128);"> 15</span> <span style="color: rgb(0, 0, 0);">    }<br /></span><span style="color: rgb(0, 128, 128);"> 16</span> <span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 17</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 18</span> <span style="color: rgb(0, 128, 0);">     * 字节数组到整数的转换<br /></span><span style="color: rgb(0, 128, 128);"> 19</span> <span style="color: rgb(0, 128, 0);">     * </span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);"> b<br /></span><span style="color: rgb(0, 128, 128);"> 20</span> <span style="color: rgb(0, 128, 0);">     * </span><span style="color: rgb(128, 128, 128);">@return</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 21</span> <span style="color: rgb(0, 128, 0);">     </span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 22</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> byteToInt(</span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] b) {<br /></span><span style="color: rgb(0, 128, 128);"> 23</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> s </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);"> 24</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> i </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">; i </span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 0);">; i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">) {<br /></span><span style="color: rgb(0, 128, 128);"> 25</span> <span style="color: rgb(0, 0, 0);">            </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (b[i] </span><span style="color: rgb(0, 0, 0);">&gt;=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">)<br /></span><span style="color: rgb(0, 128, 128);"> 26</span> <span style="color: rgb(0, 0, 0);">                s </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> s </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> b[i];<br /></span><span style="color: rgb(0, 128, 128);"> 27</span> <span style="color: rgb(0, 0, 0);">            </span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 28</span> <span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 29</span> <span style="color: rgb(0, 0, 0);">                s </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> s </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">256</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> b[i];<br /></span><span style="color: rgb(0, 128, 128);"> 30</span> <span style="color: rgb(0, 0, 0);">            s </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> s </span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">256</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);"> 31</span> <span style="color: rgb(0, 0, 0);">        }<br /></span><span style="color: rgb(0, 128, 128);"> 32</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (b[</span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 0);">] </span><span style="color: rgb(0, 0, 0);">&gt;=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">) </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> 最后一个之所以不乘，是因为可能会溢出</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 33</span> <span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">            s </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> s </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> b[</span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 0);">];<br /></span><span style="color: rgb(0, 128, 128);"> 34</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 35</span> <span style="color: rgb(0, 0, 0);">            s </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> s </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">256</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> b[</span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 0);">];<br /></span><span style="color: rgb(0, 128, 128);"> 36</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> s;<br /></span><span style="color: rgb(0, 128, 128);"> 37</span> <span style="color: rgb(0, 0, 0);">    }<br /></span><span style="color: rgb(0, 128, 128);"> 38</span> <span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 39</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 40</span> <span style="color: rgb(0, 128, 0);">     * 字符到字节转换<br /></span><span style="color: rgb(0, 128, 128);"> 41</span> <span style="color: rgb(0, 128, 0);">     * </span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);"> ch<br /></span><span style="color: rgb(0, 128, 128);"> 42</span> <span style="color: rgb(0, 128, 0);">     * </span><span style="color: rgb(128, 128, 128);">@return</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 43</span> <span style="color: rgb(0, 128, 0);">     </span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 44</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] charToByte(</span><span style="color: rgb(0, 0, 255);">char</span><span style="color: rgb(0, 0, 0);"> ch) {<br /></span><span style="color: rgb(0, 128, 128);"> 45</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> temp </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">) ch;<br /></span><span style="color: rgb(0, 128, 128);"> 46</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] b </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">2</span><span style="color: rgb(0, 0, 0);">];<br /></span><span style="color: rgb(0, 128, 128);"> 47</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> i </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> b.length </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">; i </span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">; i</span><span style="color: rgb(0, 0, 0);">--</span><span style="color: rgb(0, 0, 0);">) {<br /></span><span style="color: rgb(0, 128, 128);"> 48</span> <span style="color: rgb(0, 0, 0);">            b[i] </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> Integer(temp </span><span style="color: rgb(0, 0, 0);">&amp;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0xff</span><span style="color: rgb(0, 0, 0);">).byteValue(); </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> 将最高位保存在最低位</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 49</span> <span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">            temp </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> temp </span><span style="color: rgb(0, 0, 0);">&gt;&gt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">8</span><span style="color: rgb(0, 0, 0);">; </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> 向右移8位</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 50</span> <span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">        }<br /></span><span style="color: rgb(0, 128, 128);"> 51</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> b;<br /></span><span style="color: rgb(0, 128, 128);"> 52</span> <span style="color: rgb(0, 0, 0);">    }<br /></span><span style="color: rgb(0, 128, 128);"> 53</span> <span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 54</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 55</span> <span style="color: rgb(0, 128, 0);">     * 字节到字符转换<br /></span><span style="color: rgb(0, 128, 128);"> 56</span> <span style="color: rgb(0, 128, 0);">     * </span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);"> b<br /></span><span style="color: rgb(0, 128, 128);"> 57</span> <span style="color: rgb(0, 128, 0);">     * </span><span style="color: rgb(128, 128, 128);">@return</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 58</span> <span style="color: rgb(0, 128, 0);">     </span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 59</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">char</span><span style="color: rgb(0, 0, 0);"> byteToChar(</span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] b) {<br /></span><span style="color: rgb(0, 128, 128);"> 60</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> s </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);"> 61</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (b[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">] </span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">)<br /></span><span style="color: rgb(0, 128, 128);"> 62</span> <span style="color: rgb(0, 0, 0);">            s </span><span style="color: rgb(0, 0, 0);">+=</span><span style="color: rgb(0, 0, 0);"> b[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">];<br /></span><span style="color: rgb(0, 128, 128);"> 63</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 64</span> <span style="color: rgb(0, 0, 0);">            s </span><span style="color: rgb(0, 0, 0);">+=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">256</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> b[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">];<br /></span><span style="color: rgb(0, 128, 128);"> 65</span> <span style="color: rgb(0, 0, 0);">        s </span><span style="color: rgb(0, 0, 0);">*=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">256</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);"> 66</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (b[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">] </span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">)<br /></span><span style="color: rgb(0, 128, 128);"> 67</span> <span style="color: rgb(0, 0, 0);">            s </span><span style="color: rgb(0, 0, 0);">+=</span><span style="color: rgb(0, 0, 0);"> b[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">];<br /></span><span style="color: rgb(0, 128, 128);"> 68</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 69</span> <span style="color: rgb(0, 0, 0);">            s </span><span style="color: rgb(0, 0, 0);">+=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">256</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> b[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">];<br /></span><span style="color: rgb(0, 128, 128);"> 70</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">char</span><span style="color: rgb(0, 0, 0);"> ch </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 255);">char</span><span style="color: rgb(0, 0, 0);">) s;<br /></span><span style="color: rgb(0, 128, 128);"> 71</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> ch;<br /></span><span style="color: rgb(0, 128, 128);"> 72</span> <span style="color: rgb(0, 0, 0);">    }<br /></span><span style="color: rgb(0, 128, 128);"> 73</span> <span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 74</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 75</span> <span style="color: rgb(0, 128, 0);">     * 浮点到字节转换<br /></span><span style="color: rgb(0, 128, 128);"> 76</span> <span style="color: rgb(0, 128, 0);">     * </span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);"> d<br /></span><span style="color: rgb(0, 128, 128);"> 77</span> <span style="color: rgb(0, 128, 0);">     * </span><span style="color: rgb(128, 128, 128);">@return</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 78</span> <span style="color: rgb(0, 128, 0);">     </span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 79</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] doubleToByte(</span><span style="color: rgb(0, 0, 255);">double</span><span style="color: rgb(0, 0, 0);"> d) {<br /></span><span style="color: rgb(0, 128, 128);"> 80</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] b </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">8</span><span style="color: rgb(0, 0, 0);">];<br /></span><span style="color: rgb(0, 128, 128);"> 81</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">long</span><span style="color: rgb(0, 0, 0);"> l </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> Double.doubleToLongBits(d);<br /></span><span style="color: rgb(0, 128, 128);"> 82</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> i </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">; i </span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);"> b.length; i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">) {<br /></span><span style="color: rgb(0, 128, 128);"> 83</span> <span style="color: rgb(0, 0, 0);">            b[i] </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> Long(l).byteValue();<br /></span><span style="color: rgb(0, 128, 128);"> 84</span> <span style="color: rgb(0, 0, 0);">            l </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> l </span><span style="color: rgb(0, 0, 0);">&gt;&gt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">8</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);"> 85</span> <span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 86</span> <span style="color: rgb(0, 0, 0);">        }<br /></span><span style="color: rgb(0, 128, 128);"> 87</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> b;<br /></span><span style="color: rgb(0, 128, 128);"> 88</span> <span style="color: rgb(0, 0, 0);">    }<br /></span><span style="color: rgb(0, 128, 128);"> 89</span> <span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 90</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 91</span> <span style="color: rgb(0, 128, 0);">     * 字节到浮点转换<br /></span><span style="color: rgb(0, 128, 128);"> 92</span> <span style="color: rgb(0, 128, 0);">     * </span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);"> b<br /></span><span style="color: rgb(0, 128, 128);"> 93</span> <span style="color: rgb(0, 128, 0);">     * </span><span style="color: rgb(128, 128, 128);">@return</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 94</span> <span style="color: rgb(0, 128, 0);">     </span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 95</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">double</span><span style="color: rgb(0, 0, 0);"> byteToDouble(</span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] b) {<br /></span><span style="color: rgb(0, 128, 128);"> 96</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">long</span><span style="color: rgb(0, 0, 0);"> l;<br /></span><span style="color: rgb(0, 128, 128);"> 97</span> <span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);"> 98</span> <span style="color: rgb(0, 0, 0);">        l </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> b[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">];<br /></span><span style="color: rgb(0, 128, 128);"> 99</span> <span style="color: rgb(0, 0, 0);">        l </span><span style="color: rgb(0, 0, 0);">&amp;=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0xff</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">100</span> <span style="color: rgb(0, 0, 0);">        l </span><span style="color: rgb(0, 0, 0);">|=</span><span style="color: rgb(0, 0, 0);"> ((</span><span style="color: rgb(0, 0, 255);">long</span><span style="color: rgb(0, 0, 0);">) b[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">] </span><span style="color: rgb(0, 0, 0);">&lt;&lt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">8</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);">101</span> <span style="color: rgb(0, 0, 0);">        l </span><span style="color: rgb(0, 0, 0);">&amp;=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0xffff</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">102</span> <span style="color: rgb(0, 0, 0);">        l </span><span style="color: rgb(0, 0, 0);">|=</span><span style="color: rgb(0, 0, 0);"> ((</span><span style="color: rgb(0, 0, 255);">long</span><span style="color: rgb(0, 0, 0);">) b[</span><span style="color: rgb(0, 0, 0);">2</span><span style="color: rgb(0, 0, 0);">] </span><span style="color: rgb(0, 0, 0);">&lt;&lt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">16</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);">103</span> <span style="color: rgb(0, 0, 0);">        l </span><span style="color: rgb(0, 0, 0);">&amp;=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0xffffff</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">104</span> <span style="color: rgb(0, 0, 0);">        l </span><span style="color: rgb(0, 0, 0);">|=</span><span style="color: rgb(0, 0, 0);"> ((</span><span style="color: rgb(0, 0, 255);">long</span><span style="color: rgb(0, 0, 0);">) b[</span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 0);">] </span><span style="color: rgb(0, 0, 0);">&lt;&lt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">24</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);">105</span> <span style="color: rgb(0, 0, 0);">        l </span><span style="color: rgb(0, 0, 0);">&amp;=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0xffffffffl</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">106</span> <span style="color: rgb(0, 0, 0);">        l </span><span style="color: rgb(0, 0, 0);">|=</span><span style="color: rgb(0, 0, 0);"> ((</span><span style="color: rgb(0, 0, 255);">long</span><span style="color: rgb(0, 0, 0);">) b[</span><span style="color: rgb(0, 0, 0);">4</span><span style="color: rgb(0, 0, 0);">] </span><span style="color: rgb(0, 0, 0);">&lt;&lt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">32</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);">107</span> <span style="color: rgb(0, 0, 0);">        l </span><span style="color: rgb(0, 0, 0);">&amp;=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0xffffffffffl</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">108</span> <span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">109</span> <span style="color: rgb(0, 0, 0);">        l </span><span style="color: rgb(0, 0, 0);">|=</span><span style="color: rgb(0, 0, 0);"> ((</span><span style="color: rgb(0, 0, 255);">long</span><span style="color: rgb(0, 0, 0);">) b[</span><span style="color: rgb(0, 0, 0);">5</span><span style="color: rgb(0, 0, 0);">] </span><span style="color: rgb(0, 0, 0);">&lt;&lt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">40</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);">110</span> <span style="color: rgb(0, 0, 0);">        l </span><span style="color: rgb(0, 0, 0);">&amp;=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0xffffffffffffl</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">111</span> <span style="color: rgb(0, 0, 0);">        l </span><span style="color: rgb(0, 0, 0);">|=</span><span style="color: rgb(0, 0, 0);"> ((</span><span style="color: rgb(0, 0, 255);">long</span><span style="color: rgb(0, 0, 0);">) b[</span><span style="color: rgb(0, 0, 0);">6</span><span style="color: rgb(0, 0, 0);">] </span><span style="color: rgb(0, 0, 0);">&lt;&lt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">48</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);">112</span> <span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">113</span> <span style="color: rgb(0, 0, 0);">        l </span><span style="color: rgb(0, 0, 0);">|=</span><span style="color: rgb(0, 0, 0);"> ((</span><span style="color: rgb(0, 0, 255);">long</span><span style="color: rgb(0, 0, 0);">) b[</span><span style="color: rgb(0, 0, 0);">7</span><span style="color: rgb(0, 0, 0);">] </span><span style="color: rgb(0, 0, 0);">&lt;&lt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">56</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);">114</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> Double.longBitsToDouble(l);<br /></span><span style="color: rgb(0, 128, 128);">115</span> <span style="color: rgb(0, 0, 0);">    }<br /></span><span style="color: rgb(0, 128, 128);">116</span> <span style="color: rgb(0, 0, 0);">}</span></div>
<img src ="http://www.blogjava.net/yeafee/aggbug/111010.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yeafee/" target="_blank">@yeafee</a> 2007-04-16 16:32 <a href="http://www.blogjava.net/yeafee/archive/2007/04/16/111010.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>从控制台读数字得阶乘</title><link>http://www.blogjava.net/yeafee/archive/2006/09/16/70071.html</link><dc:creator>@yeafee</dc:creator><author>@yeafee</author><pubDate>Sat, 16 Sep 2006 11:15:00 GMT</pubDate><guid>http://www.blogjava.net/yeafee/archive/2006/09/16/70071.html</guid><wfw:comment>http://www.blogjava.net/yeafee/comments/70071.html</wfw:comment><comments>http://www.blogjava.net/yeafee/archive/2006/09/16/70071.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yeafee/comments/commentRss/70071.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yeafee/services/trackbacks/70071.html</trackback:ping><description><![CDATA[
		<p> </p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #0000ff">import</span>
				<span style="COLOR: #000000"> java.io.BufferedReader;<br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #0000ff">import</span>
				<span style="COLOR: #000000"> java.io.IOException;<br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #0000ff">import</span>
				<span style="COLOR: #000000"> java.io.InputStreamReader;<br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /><br /><img id="Codehighlighter1_111_539_Open_Image" onclick="this.style.display='none'; Codehighlighter1_111_539_Open_Text.style.display='none'; Codehighlighter1_111_539_Closed_Image.style.display='inline'; Codehighlighter1_111_539_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_111_539_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_111_539_Closed_Text.style.display='none'; Codehighlighter1_111_539_Open_Image.style.display='inline'; Codehighlighter1_111_539_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span>
				<span style="COLOR: #0000ff">public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">class</span>
				<span style="COLOR: #000000"> Test</span>
				<span id="Codehighlighter1_111_539_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.blogjava.net/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_111_539_Open_Text">
						<span style="COLOR: #000000">{<br /><img id="Codehighlighter1_173_414_Open_Image" onclick="this.style.display='none'; Codehighlighter1_173_414_Open_Text.style.display='none'; Codehighlighter1_173_414_Closed_Image.style.display='inline'; Codehighlighter1_173_414_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_173_414_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_173_414_Closed_Text.style.display='none'; Codehighlighter1_173_414_Open_Image.style.display='inline'; Codehighlighter1_173_414_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" /></span>
						<span style="COLOR: #0000ff">public</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">static</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> main(String []args ) </span>
						<span style="COLOR: #0000ff">throws</span>
						<span style="COLOR: #000000"> IOException  </span>
						<span id="Codehighlighter1_173_414_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_173_414_Open_Text">
								<span style="COLOR: #000000">{<br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />BufferedReader  br </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">new</span>
								<span style="COLOR: #000000"> BufferedReader(</span>
								<span style="COLOR: #0000ff">new</span>
								<span style="COLOR: #000000"> InputStreamReader(System.in));<br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />System.out.println(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Input one number for jiecen</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">);<br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />String no</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> br.readLine();<br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />System.out.println(no);<br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />System.out.println(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">the result is:</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">+</span>
								<span style="COLOR: #000000">n(Integer.valueOf(no)));}</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
								<br />
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
								<br />
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
								<br />
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
								<br />
								<img id="Codehighlighter1_449_537_Open_Image" onclick="this.style.display='none'; Codehighlighter1_449_537_Open_Text.style.display='none'; Codehighlighter1_449_537_Closed_Image.style.display='inline'; Codehighlighter1_449_537_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
								<img id="Codehighlighter1_449_537_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_449_537_Closed_Text.style.display='none'; Codehighlighter1_449_537_Open_Image.style.display='inline'; Codehighlighter1_449_537_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">public</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">static</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">double</span>
						<span style="COLOR: #000000"> n(</span>
						<span style="COLOR: #0000ff">int</span>
						<span style="COLOR: #000000"> n)</span>
						<span id="Codehighlighter1_449_537_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_449_537_Open_Text">
								<span style="COLOR: #000000">{<br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    <br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">double</span>
								<span style="COLOR: #000000"> result</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">;<br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    <br /><img id="Codehighlighter1_484_512_Open_Image" onclick="this.style.display='none'; Codehighlighter1_484_512_Open_Text.style.display='none'; Codehighlighter1_484_512_Closed_Image.style.display='inline'; Codehighlighter1_484_512_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_484_512_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_484_512_Closed_Text.style.display='none'; Codehighlighter1_484_512_Open_Image.style.display='inline'; Codehighlighter1_484_512_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">while</span>
								<span style="COLOR: #000000">(n</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">)</span>
								<span id="Codehighlighter1_484_512_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_484_512_Open_Text">
										<span style="COLOR: #000000">{<br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        <br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        result </span>
										<span style="COLOR: #000000">*=</span>
										<span style="COLOR: #000000">n;<br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #000000">--</span>
										<span style="COLOR: #000000">n;<br /><img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        <br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> result;<br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    <br /><img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
		</div>
<img src ="http://www.blogjava.net/yeafee/aggbug/70071.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yeafee/" target="_blank">@yeafee</a> 2006-09-16 19:15 <a href="http://www.blogjava.net/yeafee/archive/2006/09/16/70071.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>