﻿<?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>IT博客-毒菇求Buy-随笔分类-JAVA</title><link>http://www.cnitblog.com/alsan/category/118.html</link><description>Not now, when?</description><language>zh-cn</language><lastBuildDate>Sat, 01 Oct 2011 16:30:24 GMT</lastBuildDate><pubDate>Sat, 01 Oct 2011 16:30:24 GMT</pubDate><ttl>60</ttl><item><title>Together Architect for Eclipse 2006</title><link>http://www.cnitblog.com/alsan/archive/2005/10/15/3308.html</link><dc:creator>毒菇求Buy</dc:creator><author>毒菇求Buy</author><pubDate>Sat, 15 Oct 2005 02:59:00 GMT</pubDate><guid>http://www.cnitblog.com/alsan/archive/2005/10/15/3308.html</guid><wfw:comment>http://www.cnitblog.com/alsan/comments/3308.html</wfw:comment><comments>http://www.cnitblog.com/alsan/archive/2005/10/15/3308.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cnitblog.com/alsan/comments/commentRss/3308.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/alsan/services/trackbacks/3308.html</trackback:ping><description><![CDATA[<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">今天早上去Borland download了套Together Architect for Eclipse 2006，整体感觉良好。<BR><BR>不但有以往的Code modeling，更有新加入的Business Process modeling及Data modeling，真正做到以MDA建构完整项目（不一定是软件项目，不过其它项目不一定会用到Code modeling和Data modeling）的目的。其实以前这些东西都有，只不过限制比较多，用起来不方便，只好使用其它工具代替。<BR><BR>不过在安装时有一点需要注意，不能使用已安装的Eclipse，只可使用它自带有Eclipse 3.1。我本身安装了Eclipse 3.1及最新的Eclipse 3.1.1，但安装时选已安装版的Eclipse，可以安装成功，但运行出错。它的错误是找不到它自己的library。原因是它的library是以相对路径指定的，而当Eclipse不在Together下时，当然是找不到library了。</P><img src ="http://www.cnitblog.com/alsan/aggbug/3308.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/alsan/" target="_blank">毒菇求Buy</a> 2005-10-15 10:59 <a href="http://www.cnitblog.com/alsan/archive/2005/10/15/3308.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>J2EE Architects Handbook阅读笔记（四）</title><link>http://www.cnitblog.com/alsan/archive/2005/07/10/843.html</link><dc:creator>毒菇求Buy</dc:creator><author>毒菇求Buy</author><pubDate>Sat, 09 Jul 2005 23:52:00 GMT</pubDate><guid>http://www.cnitblog.com/alsan/archive/2005/07/10/843.html</guid><wfw:comment>http://www.cnitblog.com/alsan/comments/843.html</wfw:comment><comments>http://www.cnitblog.com/alsan/archive/2005/07/10/843.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cnitblog.com/alsan/comments/commentRss/843.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/alsan/services/trackbacks/843.html</trackback:ping><description><![CDATA[<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">在大部份机构，项目经理与商业方及管理层共同建立项目范围，评估所需资料。而项目经理在这几项工作中，通常会依赖技术架构师协助。</P>
<P style="FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Verdana">定义范围</P>
<UL style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">
<LI>客观地根据用例定义项目范围，及获取商业方同意 
<UL>
<LI>在项目开发期间更改范围会严重影响进度及降低员工士气 
<LI>当商业方在开发期间增加额外需求，记录入用例中及安排它们在未来的版本中。或者简略评估每个用例，并向商业方提供资料以便他们作出决定</LI></UL>
<LI>获取项目投资者对用例的同意 
<UL>
<LI>因为用例是以商业述语编写的，可以作为一份商业方与管理层之间，关于何时交付什么的“合约” 
<LI>与商业方共同选出本次项目将会被实现的用例，其它的保留作下一版本（或另一项目） 
<LI>就算范围是口头上的，也要被记录及以电子邮件通知所有项目相关的人。确保保留一个幅本。</LI></UL>
<LI>当项目范围被确认后，强制跟从</LI></UL>
<P style="FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Verdana">评估的基础</P>
<UL style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">
<LI>在项目初期的评估在有更详细计划及设计后，应该定期地细化及重新评估 
<LI>当完成外部接口、完整物件及数据模型的定义后，应该可以更准确地作出评估 
<LI>以项目组中最慢的资源作为评估 
<LI>评估应该是合比例的 
<UL>
<LI>因为计划及设计阶段包括了用例分析，这应占据整个项目生命周期的50%</LI></UL>
<LI>考虑开发、测试及生产所需的环境搭建时间 
<LI>开发人员评估编码及单元测试任务会比较合理</LI></UL>
<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana"><SPAN style="FONT-WEIGHT: bold">一个评估的算法</SPAN><BR>技术架构师只负责以小时计算评估，项目经理应因其它项目的工作及假期所引至的缺席等因素</P>
<OL style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">
<LI>确定每个用例的画面、接口、数据表及转换等的数量<BR>为项包括的用例组作以下的评估。并非每个用例都有齐所有项目，括号中的基准评估适合开发组尚未成立，如果开发组已经成立，应该可以评估得更准确。因对象模型尚未完成，此时的评估受到对象数量未知的因素影响而未能准确评估<BR>
<UL>
<LI>用户界面（2人/星期） 
<LI>外部应用程序接口（4人/星期） 
<LI>数据表（2人/星期） 
<LI>表或文件转换（2人/星期）</LI></UL>
<LI>评估每个用例所需编码及单元测试所需的时间<BR>基于第1步的评估，计算基准评估是简单地计算各用例的结合，如：所有用例合计有4个画面，2个外部应用程序接口，5个数据表，0个数据转换及2个环境设置，则基准评估如下：<BR>(4x2) + (2x4) + (5x2) + (0x2) = 26人/星期，或1,040人/小时&nbsp; 
<LI>将第2步中的基准评估值乘2.5<BR>如果编码及单元测试占每个用例的整体开销的1/3，则总开销应是基准评估的3倍。因为在此阶段约完成了50%的分析工作，总开销应是基准评估的2.5倍，因此，剩余的总项目小时是：1,040 x 2.5 = 2,600&nbsp; 
<LI>为项目中每个额外的开发人员增加20%<BR>因基准评估假设项目只有1个开发员，每增加1个开发员都会增加沟通及调配的时间约20%，虽然这些时间并非用于开发，但这是必需的开销。因此，如果项目有5个开发人员，估计时间是：2,600 x (1.2)<SUP>4</SUP>&nbsp; = 5,391hr。为说明这只是一个评估而非实际用时，最好取四舍五入为5,500hr。假设每周工作32小时（其余时间可能用于行政等工作），即开发组每周可以工作160小时，约8至9个月可以交付系统。此时以月或季度作为评估时间可避免给人一个准确交付期的观念 
<LI>与开发组成员共同讨论（review）这个评估<BR>开发人员在未得到更详细资料前，不会感受到这个评估范围。告诉他们当设计完成后会重新评估是很重要的</LI></OL>
<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana"><SPAN style="FONT-WEIGHT: bold">更多的人手很少能挽救一个被延误的项目</SPAN><BR>因为必承担沟通、调配、行政等开销，加入更多人手只会令一个已被延误的项目更延迟更多。架构师通常会被要求在所有分析完成前做一个活动领域评估（ballpark estimates）。虽然并非是字面上正确，你可以在活动领域评估中加入各项假设。</P><img src ="http://www.cnitblog.com/alsan/aggbug/843.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/alsan/" target="_blank">毒菇求Buy</a> 2005-07-10 07:52 <a href="http://www.cnitblog.com/alsan/archive/2005/07/10/843.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>J2EE Architects Handbook阅读笔记（三）</title><link>http://www.cnitblog.com/alsan/archive/2005/07/09/837.html</link><dc:creator>毒菇求Buy</dc:creator><author>毒菇求Buy</author><pubDate>Sat, 09 Jul 2005 10:30:00 GMT</pubDate><guid>http://www.cnitblog.com/alsan/archive/2005/07/09/837.html</guid><wfw:comment>http://www.cnitblog.com/alsan/comments/837.html</wfw:comment><comments>http://www.cnitblog.com/alsan/archive/2005/07/09/837.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/alsan/comments/commentRss/837.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/alsan/services/trackbacks/837.html</trackback:ping><description><![CDATA[<P style="FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Verdana">定义项目</P>
<UL style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">
<LI>开发任何应用程序的第一步是通过分析定义用途、范围及目标 
<LI>定义项目是项目经理、商业逻辑分析员及最终用户的工作，技术架构师并不直接参与 
<LI>架构师的责任是确保项目的定义中有足够的连贯性，实际设计及实现时有足够的细节 
<LI>架构师必须要有分析技能，否则不能识别项目定义中的弱点及缺口 
<LI>在分析过程中，用例是一项重要的工具 
<LI>用户界面原型可帮助精化用例</LI></UL>
<P style="FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Verdana">识别项目范围</P>
<UL style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">
<LI>在用例分析前对项目作出一个高层次的项目定义及对范围有初步的构想是需要的， 配合使用原型会更有效 
<LI>高层次定义无需过于详细，它的用途只为确定用例分析的范围</LI></UL>
<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">例子：建立一个协助项目经理计划任务，跟踪所有组成员活动及评估完成日期的系统。这个程序可以允许用户完成以下的工作：</P>
<UL style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">
<LI>定义项目及它的任务 
<LI>记录被分配入项目的人的任务及估计完成每项任务所需的时间 
<LI>记录任务被完成的次序 
<LI>记录项目进展及标记已完成任务 
<LI>自动安排项目进度表 
<LI>建立项目进展报告</LI></UL>
<P style="FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Verdana">识别参与者</P>
<UL style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">
<LI>用例分析的第一步是识别参与者 
<LI>参与者可以是用户或外部服务系统，或受影响的用例 
<LI>一个使用者可能同代表数个参与者 
<LI>考虑在大型应用程序中加入应用程序管理员作为参与者 
<LI>确保所有参与者都是直接使用系统的 
<LI>由一个小组识开始别参与者会更便利</LI></UL>
<P style="FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Verdana">编写用例</P>
<UL style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">
<LI>一个用例是对参与者使用系统的描述 
<LI>应以商业述语编写用例，应做到任何一个商业方人员无传释或技术术语表而可明白其中内容。否则，这表明在编写用例时已对所开发的程序有了技术上的假设 
<LI>用例可充当为商业及开发方之间的非正式的合约，表明将会交付一套怎样的系统 
<LI>用例应以“本系统（或本应用程序）将会”开始。如果发现不能以这种语句开始的话，很可能这只是另一个用例的其中一部份 
<LI>用例通常牵涉多个参与者，应在用列中列出所有受影响的参与者 
<LI>并无规则规定一个用例有多长，越详细越好。有不超过两句作为概要更佳 
<LI>避免使用用例图，只会浪费时间 
<LI>编写用例时需要商业方的深入参与 
<LI>以一个小组展开用例分析 
<LI>可考虑将用例加入数据库中管理 
<LI>在用例讨论时， 征召某人作为记录员 
<LI>当有更多资料时，修改现时用例 
<LI>当组成员感觉已有足够资料可以评估每个用例实施所需时间，用例分析可以结束 
<LI>确保包括有安全、可扩展性及可用性方面的需求 
<LI>当有需求有涵接问题时不要慢下来，作假设然后继续。对方有责任告诉你是什么地方错了及应如何更正。（对此点有保留，如果只是一个独立的问题可以这样处理，但很可能其它的用例会依赖于这个用例，最好还是先搞清楚需求再作分析）</LI></UL>
<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">例子：一个报表系统的用例</P>
<UL style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">
<LI>本系统将提供一个界面以接受由现存MVS/CICS应用程序生成报表模板定义 
<LI>本系统将允许应用程序管理员控制受信任的客户机构成员使用报表模板 
<LI>本系统将在运行报表时至少达到原系统的平均速度 
<LI>本系统将会限制所有受信任的客户用户只可接收到该受信任用户所属机构的数据 
<LI>本系统将会允许银行支持客户使用来自任何受信任客户机构的数据执行所有报表模板</LI></UL>
<P style="FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Verdana">常见错误</P>
<UL style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">
<LI>强加技术设计的假设作为需求</LI>
<LI>包含实际设计在用例中</LI>
<LI>分析会议效率不能保持，如无人主导、过于细节的讨论、资料不足等</LI>
<LI>用例没有文档化</LI>
<LI>在每个用例都重复定义术语</LI></UL><img src ="http://www.cnitblog.com/alsan/aggbug/837.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/alsan/" target="_blank">毒菇求Buy</a> 2005-07-09 18:30 <a href="http://www.cnitblog.com/alsan/archive/2005/07/09/837.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>J2EE Architects Handbook阅读笔记（二）</title><link>http://www.cnitblog.com/alsan/archive/2005/07/09/835.html</link><dc:creator>毒菇求Buy</dc:creator><author>毒菇求Buy</author><pubDate>Sat, 09 Jul 2005 08:36:00 GMT</pubDate><guid>http://www.cnitblog.com/alsan/archive/2005/07/09/835.html</guid><wfw:comment>http://www.cnitblog.com/alsan/comments/835.html</wfw:comment><comments>http://www.cnitblog.com/alsan/archive/2005/07/09/835.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/alsan/comments/commentRss/835.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/alsan/services/trackbacks/835.html</trackback:ping><description><![CDATA[<P style="FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Verdana">项目生命周期</P>
<UL style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">
<LI>瀑布式（Waterfall approach）</LI>
<UL>
<LI>所有的分析及设计都在编码及测试前完成</LI>
<LI>所开发出的软件往往是巨大及有较长的交付期，承担更多的风险</LI>
<LI>不在过程的初期提供反馈，但交付更完整的方案</LI>
<LI>由于需要较长的开发期而引致需求经常更改，项目经理可能要面对不修改商业逻辑则不能提供最大利益，而修改需求引致资源不足的两难局面</LI></UL>
<LI>迭代式（Iterative approaches）</LI>
<UL>
<LI>尽量分柝项目为细小的组件块，需要较少资源</LI>
<LI>其中一种最流行的方式是XP（Extreme Programming）</LI>
<LI>在长开发周期中，越早发现错误成本越低</LI>
<LI>在长开发周期中，减低复杂性同时也减低技术风险及成本</LI></UL>
<LI>Rational Unified Process （RUP）</LI>
<UL>
<LI>形式化的开发方法</LI>
<LI>在分析及设计阶段采用瀑布式方法，在建构及交付时采用迭代式方法</LI>
<LI>鼓励尽早收集及分析需求，尽量满足使用者的祈望</LI>
<LI>鼓励先开发最具风险部份，以便有更多时间识别及回应问题，同时也减少重新设计所需的改写工作量</LI></UL></UL>
<P style="FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Verdana">哪种方法最流行？</P>
<UL style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">
<LI>考虑采用混合模式（Hybird approach）</LI>
<LI>XP所强调的测试具有非常大的价值</LI>
<LI>XP可用于针对复杂的的问题</LI>
<LI>RUP所强调的集中分析及设计具有非常大的价值</LI>
<LI>需要控制与最终用户间的沟通</LI></UL><img src ="http://www.cnitblog.com/alsan/aggbug/835.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/alsan/" target="_blank">毒菇求Buy</a> 2005-07-09 16:36 <a href="http://www.cnitblog.com/alsan/archive/2005/07/09/835.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>J2EE Architects Handbook阅读笔记（一）</title><link>http://www.cnitblog.com/alsan/archive/2005/07/09/832.html</link><dc:creator>毒菇求Buy</dc:creator><author>毒菇求Buy</author><pubDate>Sat, 09 Jul 2005 03:54:00 GMT</pubDate><guid>http://www.cnitblog.com/alsan/archive/2005/07/09/832.html</guid><wfw:comment>http://www.cnitblog.com/alsan/comments/832.html</wfw:comment><comments>http://www.cnitblog.com/alsan/archive/2005/07/09/832.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/alsan/comments/commentRss/832.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/alsan/services/trackbacks/832.html</trackback:ping><description><![CDATA[<P style="FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Verdana">开发组角色及其责任</P>
<UL style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">
<LI>技术架构师（Technical architect） 
<UL>
<LI>识别项目所需用到的技术 
<LI>建议项目开发小组所采用方法（methodologies）及框架（frameworks） 
<LI>提供整体设计及应用程序的结构 
<LI>确保项目已被适当地定义 
<LI>确保应用程序设计已被适当地文档化 
<LI>制定编码指引及确保有被跟从 
<LI>帮助项目经理识别需要执行的任务，评估项目造价及得益 
<LI>面对困难的任务时，作为开发人员的导师 
<LI>协助管理层对开发员职位上的安排</LI></UL>
<LI>项目经理（Project manager） 
<UL>
<LI>负责为项目组所有成员协调及计划任务 
<LI>向管理层及最终用户代表汇报项目状态 
<LI>向管理层要求项目所需的资源 
<LI>技术架构师应向项目经理提供技术方面的建议及指引</LI></UL>
<LI>商业逻辑分析员（Business analyst） 
<UL>
<LI>负责与最终使用者共同定义应用程序的需求 
<LI>负责制定术语表 
<LI>应对最终用户方及资讯方的企业流程有经验 
<LI>技术架构师有责任确保商业逻辑分析员所确认的应用程序需求是适当的</LI></UL>
<LI>界面设计师（Layout designer） 
<UL>
<LI>与商业逻辑分析员及客户方代表共同设计出界面 
<LI>与表示层开发员共同建立应用程序原型（prototype） 
<LI>技术架构师有责任确保界面设计师所设计出来的界面是技术上可行的</LI></UL>
<LI>表示层开发员（Presentation-tier developer） 
<UL>
<LI>负责对应用程序中所有界面相关的编码 
<LI>与界面设计师共同建立应用程序的原型及工作版本 
<LI>与技术架构师共同界定前台浏览的结构及设计 
<LI>技术架构师有责任确保设计模式的可维护性及可扩展性</LI></UL>
<LI>商业逻辑层开发员（Business logic developer） 
<UL>
<LI>负责应用程序中所有非可视部份的编码 
<LI>协助技术架构师对应用程序在开发语言相关方面进行性能调整&nbsp; 
<LI>技术架构师应向商业逻辑层开发人员提供指引</LI></UL>
<LI>数据模型师（Data modeler） 
<UL>
<LI>使用商业逻辑分析员所提供的资料识别、定义及分类应用程序在数据库中储存的数据</LI>
<LI>为应用程序建立ER图及文档，主要读者为数据库管理员</LI>
<LI>此角色一般可与数据库管理员合并</LI>
<LI>技术架构师有责任确保数据模型是适当的</LI></UL>
<LI>数据库管理员（Database administrator） 
<UL>
<LI>负责基于应用程序的商业需求阐明数据库设计</LI>
<LI>为应用程序建立、维护数据库环境</LI>
<LI>提供性能调整方面的协助</LI>
<LI>协助商业逻辑开发员诊断与数据存取相关的应用程序开发问题</LI>
<LI>经常会兼任商业逻辑开发员或数据升级专员</LI>
<LI>技术架构师需与数据库管理员共同解决数据储存的难题</LI></UL>
<LI>数据升级专员（Data migration specialist） 
<UL>
<LI>负责持续地编写及管理所有应用程序数据库所需的脚本及程序</LI>
<LI>当应用程序无须或只须少量数据升级要求时，此角色通常与数据库管理员合并</LI>
<LI>技术架构师需为数据升级专员制定数据升级需求</LI></UL>
<LI>系统建构专员/系统管理员（Infrastructure specialist/System administator） 
<UL>
<LI>负责提供所有开发、测试及生产的环境，与及其配置方法</LI>
<LI>编写配置脚本</LI>
<LI>以测试环境协助开发人员诊断问题</LI>
<LI>技术架构师需为系统建构专员制定系统建构需求</LI></UL>
<LI>测试专员/测试员（Testing specialist/Tester） 
<UL>
<LI>通常是比较细心的人</LI>
<LI>确保应用程序符合规格及只包含合理数量的BUG</LI>
<LI>通常对所开发的商业领域有基本知识</LI>
<LI>技术架构师需与测试员共同识别任何建构需求及所需支持</LI></UL></LI></UL><img src ="http://www.cnitblog.com/alsan/aggbug/832.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/alsan/" target="_blank">毒菇求Buy</a> 2005-07-09 11:54 <a href="http://www.cnitblog.com/alsan/archive/2005/07/09/832.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Linux下getResourceAsStream的一个问题</title><link>http://www.cnitblog.com/alsan/archive/2005/06/17/436.html</link><dc:creator>毒菇求Buy</dc:creator><author>毒菇求Buy</author><pubDate>Fri, 17 Jun 2005 11:31:00 GMT</pubDate><guid>http://www.cnitblog.com/alsan/archive/2005/06/17/436.html</guid><wfw:comment>http://www.cnitblog.com/alsan/comments/436.html</wfw:comment><comments>http://www.cnitblog.com/alsan/archive/2005/06/17/436.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/alsan/comments/commentRss/436.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/alsan/services/trackbacks/436.html</trackback:ping><description><![CDATA[<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">今天发现在Linux下使用getResourceAsStream有一个不能完整读取数据的问题。代码如下：<BR><BR></P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; FONT-SIZE: 12px; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Verdana">
<DIV><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;void testDataCompare()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">try</SPAN><SPAN style="COLOR: #000000">&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InputStream&nbsp;iStream&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;getClass().getResourceAsStream(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">/data.bin</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000">[]&nbsp;dSrc&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000">[iStream.available()];<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iStream.read(dSrc);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FileInputStream&nbsp;fStream&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;FileInputStream(</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;File(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">data.bin</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000">[]&nbsp;dTrg&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000">[fStream.available()];<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fStream.read(dTrg);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;boolean&nbsp;success&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">false</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(dSrc.length&nbsp;</SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">&nbsp;dTrg.length)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;i</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">dSrc.length&nbsp;</SPAN><SPAN style="COLOR: #000000">&amp;&amp;</SPAN><SPAN style="COLOR: #000000">&nbsp;(success&nbsp;</SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">&nbsp;(dSrc[i]&nbsp;</SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">&nbsp;dTrg[i]));&nbsp;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #000000">.println(success&nbsp;</SPAN><SPAN style="COLOR: #000000">?</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">same</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">not&nbsp;same</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</SPAN><SPAN style="COLOR: #0000ff">catch</SPAN><SPAN style="COLOR: #000000">(Exception&nbsp;e)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.printStackTrace();<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>}</SPAN></DIV></DIV>
<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">注：</P>
<OL style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">
<LI>iStream及fStream所读取的其实是同一个文件，整个文件大小为902 byte。 
<LI>Windows及Linux下均使用jdk1.5.0_01。 
<LI>程序在Windows下compile及打包成jar。 
<LI>将dSrc及dTrg的内容dump出来看，发现dSrc在507 byte之后所有内容均是0。 
<LI>同一段代码在Windows XP下完全无问题。<BR></LI></OL>
<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">有其他人有类似情况吗？或者有无类似环境可以测试？<BR></P><img src ="http://www.cnitblog.com/alsan/aggbug/436.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/alsan/" target="_blank">毒菇求Buy</a> 2005-06-17 19:31 <a href="http://www.cnitblog.com/alsan/archive/2005/06/17/436.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>一个简化java.util.regex.*使用的类</title><link>http://www.cnitblog.com/alsan/archive/2005/06/13/373.html</link><dc:creator>毒菇求Buy</dc:creator><author>毒菇求Buy</author><pubDate>Mon, 13 Jun 2005 09:12:00 GMT</pubDate><guid>http://www.cnitblog.com/alsan/archive/2005/06/13/373.html</guid><wfw:comment>http://www.cnitblog.com/alsan/comments/373.html</wfw:comment><comments>http://www.cnitblog.com/alsan/archive/2005/06/13/373.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/alsan/comments/commentRss/373.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/alsan/services/trackbacks/373.html</trackback:ping><description><![CDATA[<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; FONT-SIZE: 12px; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Verdana">
<DIV><SPAN style="COLOR: #008000">/*</SPAN><SPAN style="COLOR: #008000"><BR>&nbsp;*&nbsp;PatternMatcher.java<BR>&nbsp;*&nbsp;Permission&nbsp;to&nbsp;use,&nbsp;copy,&nbsp;modify,&nbsp;and&nbsp;distribute&nbsp;this&nbsp;software<BR>&nbsp;*&nbsp;and&nbsp;its&nbsp;documentation&nbsp;for&nbsp;NON-COMMERCIAL&nbsp;purposes&nbsp;and&nbsp;without<BR>&nbsp;*&nbsp;fee&nbsp;is&nbsp;hereby&nbsp;granted&nbsp;provided&nbsp;that&nbsp;this&nbsp;copyright&nbsp;notice<BR>&nbsp;*&nbsp;appears&nbsp;in&nbsp;all&nbsp;copies.<BR>&nbsp;*<BR>&nbsp;*&nbsp;ALSAN&nbsp;WONG&nbsp;MAKES&nbsp;NO&nbsp;REPRESENTATIONS&nbsp;OR&nbsp;WARRANTIES&nbsp;ABOUT&nbsp;THE<BR>&nbsp;*&nbsp;SUITABILITY&nbsp;OF&nbsp;THE&nbsp;SOFTWARE,&nbsp;EITHER&nbsp;EXPRESS&nbsp;OR&nbsp;IMPLIED,&nbsp;INCLUDING<BR>&nbsp;*&nbsp;BUT&nbsp;NOT&nbsp;LIMITED&nbsp;TO&nbsp;THE&nbsp;IMPLIED&nbsp;WARRANTIES&nbsp;OF&nbsp;MERCHANTABILITY,<BR>&nbsp;*&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE,&nbsp;OR&nbsp;NON-INFRINGEMENT.&nbsp;ALSAN&nbsp;WONG<BR>&nbsp;*&nbsp;SHALL&nbsp;NOT&nbsp;BE&nbsp;LIABLE&nbsp;FOR&nbsp;ANY&nbsp;DAMAGES&nbsp;SUFFERED&nbsp;BY&nbsp;LICENSEE&nbsp;AS&nbsp;A&nbsp;RESULT<BR>&nbsp;*&nbsp;OF&nbsp;USING,&nbsp;MODIFYING&nbsp;OR&nbsp;DISTRIBUTING&nbsp;THIS&nbsp;SOFTWARE&nbsp;OR&nbsp;ITS&nbsp;DERIVATIVES.<BR>&nbsp;*&nbsp;<BR>&nbsp;*&nbsp;Created&nbsp;on&nbsp;2005-6-13<BR>&nbsp;*&nbsp;Copyright&nbsp;2005,&nbsp;alsan.home.net<BR>&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN><SPAN style="COLOR: #000000"><BR>package&nbsp;net.alsan.jlib.util;<BR><BR>import&nbsp;java.util.ArrayList;<BR>import&nbsp;java.util.regex.</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">;<BR><BR></SPAN><SPAN style="COLOR: #008000">/*</SPAN><SPAN style="COLOR: #008000">*<BR>&nbsp;*&nbsp;<BR>&nbsp;*&nbsp;@author&nbsp;alsan<BR>&nbsp;*&nbsp;@version&nbsp;1.0<BR>&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;final&nbsp;</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;PatternMatcher&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;final&nbsp;Pattern&nbsp;pattern;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;Matcher&nbsp;matcher;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;PatternMatcher(String&nbsp;sPattern)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pattern&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;Pattern.compile(sPattern);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;boolean&nbsp;match(String&nbsp;content)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;(matcher&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;pattern.matcher(content)).find();<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;ArrayList&nbsp;getMatchesList()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ArrayList&nbsp;matches&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;ArrayList();<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">do</SPAN><SPAN style="COLOR: #000000">&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ArrayList&nbsp;groups&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;ArrayList();<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">&nbsp;(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,&nbsp;cnt&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;matcher.groupCount();&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">&nbsp;cnt;&nbsp;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;groups.add(matcher.group(i&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;matches.add(groups);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000">&nbsp;(matcher.find());<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;matches;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;String[][]&nbsp;getMatches()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ArrayList&nbsp;list&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;getMatchesList();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String[][]&nbsp;matches&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;String[list.size()][];<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">&nbsp;(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">&nbsp;matches.length;&nbsp;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ArrayList&nbsp;groups&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;(ArrayList)&nbsp;list.</SPAN><SPAN style="COLOR: #0000ff">get</SPAN><SPAN style="COLOR: #000000">(i);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;matches[i]&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;String[groups.size()];<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">&nbsp;(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;j&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;j&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">&nbsp;matches[i].length;&nbsp;j</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;matches[i][j]&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;(String)&nbsp;groups.</SPAN><SPAN style="COLOR: #0000ff">get</SPAN><SPAN style="COLOR: #000000">(j);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;matches;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>}<BR></SPAN></DIV></DIV>
<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">测试代码：<BR></P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; FONT-SIZE: 12px; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Verdana">
<DIV><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;main(String[]&nbsp;args)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;final&nbsp;PatternMatcher&nbsp;regex&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;PatternMatcher(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">(\\d{2,4}-\\d{1,2}-\\d{1,2})</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(regex.match(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">05-1-10,100;2005-01-11,1000</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">))&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String[][]&nbsp;matches&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;regex.getMatches();<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">&nbsp;(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">&nbsp;matches.length;&nbsp;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">&nbsp;(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;j&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;j&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">&nbsp;matches[i].length;&nbsp;j</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #000000">.println(matches[i][j]);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR></SPAN></DIV></DIV>
<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">输出结果：<BR></P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; FONT-SIZE: 12px; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Verdana">
<DIV><SPAN style="COLOR: #000000">05</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">10</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #000000">2005</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">01</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">11</SPAN><SPAN style="COLOR: #000000"><BR></SPAN></DIV></DIV><img src ="http://www.cnitblog.com/alsan/aggbug/373.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/alsan/" target="_blank">毒菇求Buy</a> 2005-06-13 17:12 <a href="http://www.cnitblog.com/alsan/archive/2005/06/13/373.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Java中请求HTTPS加密的源代码</title><link>http://www.cnitblog.com/alsan/archive/2005/06/13/371.html</link><dc:creator>毒菇求Buy</dc:creator><author>毒菇求Buy</author><pubDate>Mon, 13 Jun 2005 05:26:00 GMT</pubDate><guid>http://www.cnitblog.com/alsan/archive/2005/06/13/371.html</guid><wfw:comment>http://www.cnitblog.com/alsan/comments/371.html</wfw:comment><comments>http://www.cnitblog.com/alsan/archive/2005/06/13/371.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cnitblog.com/alsan/comments/commentRss/371.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/alsan/services/trackbacks/371.html</trackback:ping><description><![CDATA[<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; FONT-SIZE: 12px; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Verdana">
<DIV><SPAN style="COLOR: #000000">import&nbsp;java.io.</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">;<BR>import&nbsp;java.net.</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">;<BR>import&nbsp;java.security.</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">;<BR>import&nbsp;java.security.cert.</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">;<BR>import&nbsp;java.util.</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">;<BR>import&nbsp;javax.net.ssl.</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">;<BR><BR></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;HttpsTest&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;We&nbsp;would&nbsp;never&nbsp;hardcode&nbsp;this&nbsp;literal&nbsp;in&nbsp;a&nbsp;real&nbsp;system,<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;this&nbsp;is&nbsp;only&nbsp;for&nbsp;this&nbsp;article.</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;String&nbsp;url&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">https://localhost/</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;Create&nbsp;an&nbsp;anonymous&nbsp;class&nbsp;to&nbsp;trust&nbsp;all&nbsp;certificates.<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;This&nbsp;is&nbsp;bad&nbsp;style,&nbsp;you&nbsp;should&nbsp;create&nbsp;a&nbsp;separate&nbsp;class.</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;X509TrustManager&nbsp;xtm&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;X509TrustManager()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;checkClientTrusted(X509Certificate[]&nbsp;chain,&nbsp;String&nbsp;authType)&nbsp;{}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;checkServerTrusted(X509Certificate[]&nbsp;chain,&nbsp;String&nbsp;authType)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #000000">.println(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">cert:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;chain[</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">].toString()&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,&nbsp;authType:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;authType);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;X509Certificate[]&nbsp;getAcceptedIssuers()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;};&nbsp;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;Create&nbsp;an&nbsp;class&nbsp;to&nbsp;trust&nbsp;all&nbsp;hosts</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;HostnameVerifier&nbsp;hnv&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;HostnameVerifier()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;boolean&nbsp;verify(String&nbsp;hostname,&nbsp;SSLSession&nbsp;session)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #000000">.println(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">hostname:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;hostname);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">true</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;};&nbsp;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;In&nbsp;this&nbsp;function&nbsp;we&nbsp;configure&nbsp;our&nbsp;system&nbsp;with&nbsp;a&nbsp;less&nbsp;stringent<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;hostname&nbsp;verifier&nbsp;and&nbsp;X509&nbsp;trust&nbsp;manager.&nbsp;&nbsp;This&nbsp;code&nbsp;is<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;executed&nbsp;once,&nbsp;and&nbsp;calls&nbsp;the&nbsp;static&nbsp;methods&nbsp;of&nbsp;HttpsURLConnection</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;HttpsTest()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;Initialize&nbsp;the&nbsp;TLS&nbsp;SSLContext&nbsp;with<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;our&nbsp;TrustManager</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SSLContext&nbsp;sslContext&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">try</SPAN><SPAN style="COLOR: #000000">&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sslContext&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;SSLContext.getInstance(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">TLS</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X509TrustManager[]&nbsp;xtmArray&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;X509TrustManager[]&nbsp;{&nbsp;xtm&nbsp;};<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sslContext.init(</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">,&nbsp;xtmArray,&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;java.security.SecureRandom());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</SPAN><SPAN style="COLOR: #0000ff">catch</SPAN><SPAN style="COLOR: #000000">(GeneralSecurityException&nbsp;gse)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;Print&nbsp;out&nbsp;some&nbsp;error&nbsp;message&nbsp;and&nbsp;deal&nbsp;with&nbsp;this&nbsp;exception</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;Set&nbsp;the&nbsp;default&nbsp;SocketFactory&nbsp;and&nbsp;HostnameVerifier<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;for&nbsp;javax.net.ssl.HttpsURLConnection</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(sslContext&nbsp;</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HttpsURLConnection.setDefaultHostnameVerifier(hnv);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;This&nbsp;function&nbsp;is&nbsp;called&nbsp;periodically,&nbsp;the&nbsp;important&nbsp;thing<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;to&nbsp;note&nbsp;here&nbsp;is&nbsp;that&nbsp;there&nbsp;is&nbsp;no&nbsp;special&nbsp;code&nbsp;that&nbsp;needs&nbsp;to<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;be&nbsp;added&nbsp;to&nbsp;deal&nbsp;with&nbsp;a&nbsp;"HTTPS"&nbsp;URL.&nbsp;&nbsp;All&nbsp;of&nbsp;the&nbsp;trust<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;management,&nbsp;verification,&nbsp;is&nbsp;handled&nbsp;by&nbsp;the&nbsp;HttpsURLConnection.</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;run()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">try</SPAN><SPAN style="COLOR: #000000">&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;URLConnection&nbsp;urlCon&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;(</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;URL(url)).openConnection();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BufferedReader&nbsp;</SPAN><SPAN style="COLOR: #0000ff">in</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;BufferedReader(</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;InputStreamReader(urlCon.getInputStream()));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;line;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000">((line&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">in</SPAN><SPAN style="COLOR: #000000">.readLine())&nbsp;</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #000000">.println(line);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;Whatever&nbsp;we&nbsp;want&nbsp;to&nbsp;do&nbsp;with&nbsp;these&nbsp;quotes</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</SPAN><SPAN style="COLOR: #0000ff">catch</SPAN><SPAN style="COLOR: #000000">(MalformedURLException&nbsp;mue)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mue.printStackTrace();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</SPAN><SPAN style="COLOR: #0000ff">catch</SPAN><SPAN style="COLOR: #000000">(IOException&nbsp;ioe)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ioe.printStackTrace();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</SPAN><SPAN style="COLOR: #0000ff">catch</SPAN><SPAN style="COLOR: #000000">(Exception&nbsp;e)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.printStackTrace();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;main(String[]&nbsp;args)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HttpsTest&nbsp;httpsTest&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;HttpsTest();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;httpsTest.run();<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>}<BR></SPAN></DIV></DIV><img src ="http://www.cnitblog.com/alsan/aggbug/371.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/alsan/" target="_blank">毒菇求Buy</a> 2005-06-13 13:26 <a href="http://www.cnitblog.com/alsan/archive/2005/06/13/371.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>一组配合log4j使用的debug class</title><link>http://www.cnitblog.com/alsan/archive/2005/06/12/357.html</link><dc:creator>毒菇求Buy</dc:creator><author>毒菇求Buy</author><pubDate>Sun, 12 Jun 2005 07:48:00 GMT</pubDate><guid>http://www.cnitblog.com/alsan/archive/2005/06/12/357.html</guid><wfw:comment>http://www.cnitblog.com/alsan/comments/357.html</wfw:comment><comments>http://www.cnitblog.com/alsan/archive/2005/06/12/357.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cnitblog.com/alsan/comments/commentRss/357.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/alsan/services/trackbacks/357.html</trackback:ping><description><![CDATA[<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">因为经常需要debug一些realtime app，无法在debuger下操作，特别写了一组class，方便配合log4j将debug message写入file。</P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; FONT-SIZE: 12px; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Verdana">
<DIV><SPAN style="COLOR: #008000">/*</SPAN><SPAN style="COLOR: #008000"><BR>&nbsp;*&nbsp;LogFormatter.java<BR>&nbsp;*&nbsp;Permission&nbsp;to&nbsp;use,&nbsp;copy,&nbsp;modify,&nbsp;and&nbsp;distribute&nbsp;this&nbsp;software<BR>&nbsp;*&nbsp;and&nbsp;its&nbsp;documentation&nbsp;for&nbsp;NON-COMMERCIAL&nbsp;purposes&nbsp;and&nbsp;without<BR>&nbsp;*&nbsp;fee&nbsp;is&nbsp;hereby&nbsp;granted&nbsp;provided&nbsp;that&nbsp;this&nbsp;copyright&nbsp;notice<BR>&nbsp;*&nbsp;appears&nbsp;in&nbsp;all&nbsp;copies.<BR>&nbsp;*<BR>&nbsp;*&nbsp;ALSAN&nbsp;WONG&nbsp;MAKES&nbsp;NO&nbsp;REPRESENTATIONS&nbsp;OR&nbsp;WARRANTIES&nbsp;ABOUT&nbsp;THE<BR>&nbsp;*&nbsp;SUITABILITY&nbsp;OF&nbsp;THE&nbsp;SOFTWARE,&nbsp;EITHER&nbsp;EXPRESS&nbsp;OR&nbsp;IMPLIED,&nbsp;INCLUDING<BR>&nbsp;*&nbsp;BUT&nbsp;NOT&nbsp;LIMITED&nbsp;TO&nbsp;THE&nbsp;IMPLIED&nbsp;WARRANTIES&nbsp;OF&nbsp;MERCHANTABILITY,<BR>&nbsp;*&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE,&nbsp;OR&nbsp;NON-INFRINGEMENT.&nbsp;ALSAN&nbsp;WONG<BR>&nbsp;*&nbsp;SHALL&nbsp;NOT&nbsp;BE&nbsp;LIABLE&nbsp;FOR&nbsp;ANY&nbsp;DAMAGES&nbsp;SUFFERED&nbsp;BY&nbsp;LICENSEE&nbsp;AS&nbsp;A&nbsp;RESULT<BR>&nbsp;*&nbsp;OF&nbsp;USING,&nbsp;MODIFYING&nbsp;OR&nbsp;DISTRIBUTING&nbsp;THIS&nbsp;SOFTWARE&nbsp;OR&nbsp;ITS&nbsp;DERIVATIVES.<BR>&nbsp;*&nbsp;<BR>&nbsp;*&nbsp;Created&nbsp;on&nbsp;2005-6-3<BR>&nbsp;*&nbsp;Copyright&nbsp;2005,&nbsp;alsan.home.net<BR>&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN><SPAN style="COLOR: #000000"><BR>package&nbsp;net.alsan.jlib.util.log;<BR><BR><BR></SPAN><SPAN style="COLOR: #008000">/*</SPAN><SPAN style="COLOR: #008000">*<BR>&nbsp;*&nbsp;<BR>&nbsp;*&nbsp;@author&nbsp;alsan<BR>&nbsp;*&nbsp;@version&nbsp;1.0<BR>&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">abstract</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;LogFormatter&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">protected</SPAN><SPAN style="COLOR: #000000">&nbsp;StringBuilder&nbsp;buf&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;StringBuilder();<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;String&nbsp;toString()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;msg&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;buf.toString();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;buf&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;StringBuilder();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;msg;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">abstract</SPAN><SPAN style="COLOR: #000000">&nbsp;LogFormatter&nbsp;print(String&nbsp;msg);<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">abstract</SPAN><SPAN style="COLOR: #000000">&nbsp;LogFormatter&nbsp;println(String&nbsp;msg);<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">abstract</SPAN><SPAN style="COLOR: #000000">&nbsp;LogFormatter&nbsp;println();<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;LogFormatter&nbsp;append(String&nbsp;msg)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;buf.append(msg);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;LogFormatter&nbsp;appendln(String&nbsp;msg)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;buf.append(msg).append(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>}<BR></SPAN></DIV></DIV><BR>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; FONT-SIZE: 12px; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Verdana">
<DIV><SPAN style="COLOR: #008000">/*</SPAN><SPAN style="COLOR: #008000"><BR>&nbsp;*&nbsp;PrefixLogFormatter.java<BR>&nbsp;*&nbsp;Permission&nbsp;to&nbsp;use,&nbsp;copy,&nbsp;modify,&nbsp;and&nbsp;distribute&nbsp;this&nbsp;software<BR>&nbsp;*&nbsp;and&nbsp;its&nbsp;documentation&nbsp;for&nbsp;NON-COMMERCIAL&nbsp;purposes&nbsp;and&nbsp;without<BR>&nbsp;*&nbsp;fee&nbsp;is&nbsp;hereby&nbsp;granted&nbsp;provided&nbsp;that&nbsp;this&nbsp;copyright&nbsp;notice<BR>&nbsp;*&nbsp;appears&nbsp;in&nbsp;all&nbsp;copies.<BR>&nbsp;*<BR>&nbsp;*&nbsp;ALSAN&nbsp;WONG&nbsp;MAKES&nbsp;NO&nbsp;REPRESENTATIONS&nbsp;OR&nbsp;WARRANTIES&nbsp;ABOUT&nbsp;THE<BR>&nbsp;*&nbsp;SUITABILITY&nbsp;OF&nbsp;THE&nbsp;SOFTWARE,&nbsp;EITHER&nbsp;EXPRESS&nbsp;OR&nbsp;IMPLIED,&nbsp;INCLUDING<BR>&nbsp;*&nbsp;BUT&nbsp;NOT&nbsp;LIMITED&nbsp;TO&nbsp;THE&nbsp;IMPLIED&nbsp;WARRANTIES&nbsp;OF&nbsp;MERCHANTABILITY,<BR>&nbsp;*&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE,&nbsp;OR&nbsp;NON-INFRINGEMENT.&nbsp;ALSAN&nbsp;WONG<BR>&nbsp;*&nbsp;SHALL&nbsp;NOT&nbsp;BE&nbsp;LIABLE&nbsp;FOR&nbsp;ANY&nbsp;DAMAGES&nbsp;SUFFERED&nbsp;BY&nbsp;LICENSEE&nbsp;AS&nbsp;A&nbsp;RESULT<BR>&nbsp;*&nbsp;OF&nbsp;USING,&nbsp;MODIFYING&nbsp;OR&nbsp;DISTRIBUTING&nbsp;THIS&nbsp;SOFTWARE&nbsp;OR&nbsp;ITS&nbsp;DERIVATIVES.<BR>&nbsp;*&nbsp;<BR>&nbsp;*&nbsp;Created&nbsp;on&nbsp;2005-6-13<BR>&nbsp;*&nbsp;Copyright&nbsp;2005,&nbsp;alsan.home.net<BR>&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN><SPAN style="COLOR: #000000"><BR>package&nbsp;net.alsan.jlib.util.log;<BR><BR></SPAN><SPAN style="COLOR: #008000">/*</SPAN><SPAN style="COLOR: #008000">*<BR>&nbsp;*&nbsp;<BR>&nbsp;*&nbsp;@author&nbsp;alsan<BR>&nbsp;*&nbsp;@version&nbsp;1.0<BR>&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;PrefixLogFormatter&nbsp;extends&nbsp;LogFormatter&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">protected</SPAN><SPAN style="COLOR: #000000">&nbsp;String&nbsp;prefix&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">""</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">protected</SPAN><SPAN style="COLOR: #000000">&nbsp;String&nbsp;_prefix&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">""</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;PrefixLogFormatter(String&nbsp;prefix)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_prefix&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;prefix;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setPrefix(prefix);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;setPrefix(String&nbsp;prefix)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">.prefix&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;prefix&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;LogFormatter&nbsp;println(String&nbsp;msg)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;print(msg).append(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;LogFormatter&nbsp;print(String&nbsp;msg)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;append(prefix).append(msg);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;LogFormatter&nbsp;println()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;append(prefix).append(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>}<BR></SPAN></DIV></DIV><BR>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; FONT-SIZE: 12px; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Verdana">
<DIV><SPAN style="COLOR: #008000">/*</SPAN><SPAN style="COLOR: #008000"><BR>&nbsp;*&nbsp;IndentLogFormatter.java<BR>&nbsp;*&nbsp;Permission&nbsp;to&nbsp;use,&nbsp;copy,&nbsp;modify,&nbsp;and&nbsp;distribute&nbsp;this&nbsp;software<BR>&nbsp;*&nbsp;and&nbsp;its&nbsp;documentation&nbsp;for&nbsp;NON-COMMERCIAL&nbsp;purposes&nbsp;and&nbsp;without<BR>&nbsp;*&nbsp;fee&nbsp;is&nbsp;hereby&nbsp;granted&nbsp;provided&nbsp;that&nbsp;this&nbsp;copyright&nbsp;notice<BR>&nbsp;*&nbsp;appears&nbsp;in&nbsp;all&nbsp;copies.<BR>&nbsp;*<BR>&nbsp;*&nbsp;ALSAN&nbsp;WONG&nbsp;MAKES&nbsp;NO&nbsp;REPRESENTATIONS&nbsp;OR&nbsp;WARRANTIES&nbsp;ABOUT&nbsp;THE<BR>&nbsp;*&nbsp;SUITABILITY&nbsp;OF&nbsp;THE&nbsp;SOFTWARE,&nbsp;EITHER&nbsp;EXPRESS&nbsp;OR&nbsp;IMPLIED,&nbsp;INCLUDING<BR>&nbsp;*&nbsp;BUT&nbsp;NOT&nbsp;LIMITED&nbsp;TO&nbsp;THE&nbsp;IMPLIED&nbsp;WARRANTIES&nbsp;OF&nbsp;MERCHANTABILITY,<BR>&nbsp;*&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE,&nbsp;OR&nbsp;NON-INFRINGEMENT.&nbsp;ALSAN&nbsp;WONG<BR>&nbsp;*&nbsp;SHALL&nbsp;NOT&nbsp;BE&nbsp;LIABLE&nbsp;FOR&nbsp;ANY&nbsp;DAMAGES&nbsp;SUFFERED&nbsp;BY&nbsp;LICENSEE&nbsp;AS&nbsp;A&nbsp;RESULT<BR>&nbsp;*&nbsp;OF&nbsp;USING,&nbsp;MODIFYING&nbsp;OR&nbsp;DISTRIBUTING&nbsp;THIS&nbsp;SOFTWARE&nbsp;OR&nbsp;ITS&nbsp;DERIVATIVES.<BR>&nbsp;*&nbsp;<BR>&nbsp;*&nbsp;Created&nbsp;on&nbsp;2005-6-13<BR>&nbsp;*&nbsp;Copyright&nbsp;2005,&nbsp;alsan.home.net<BR>&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN><SPAN style="COLOR: #000000"><BR>package&nbsp;net.alsan.jlib.util.log;<BR><BR>import&nbsp;java.util.Stack;<BR><BR></SPAN><SPAN style="COLOR: #008000">/*</SPAN><SPAN style="COLOR: #008000">*<BR>&nbsp;*&nbsp;<BR>&nbsp;*&nbsp;@author&nbsp;alsan<BR>&nbsp;*&nbsp;@version&nbsp;1.0<BR>&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;IndentLogFormatter&nbsp;extends&nbsp;PrefixLogFormatter&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;Stack&nbsp;stack&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;Stack();<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;IndentLogFormatter(String&nbsp;prefix)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;super(prefix);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;setTabPrefix()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000">[]&nbsp;pool&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000">[stack.size()];<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;i</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">pool.length;&nbsp;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pool[i]&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">\t</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prefix&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;_prefix&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;String(pool);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;LogFormatter&nbsp;beginBlock(String&nbsp;block)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;pfix&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;prefix;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stack.push(block);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setTabPrefix();<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;append(pfix).append(block).appendln(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;{</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;LogFormatter&nbsp;endBlock()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;block&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;(String)stack.pop();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setTabPrefix();<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;print(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">}&nbsp;//</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">).appendln(block);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>}<BR></SPAN></DIV></DIV><BR>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; FONT-SIZE: 12px; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Verdana">
<DIV><SPAN style="COLOR: #008000">/*</SPAN><SPAN style="COLOR: #008000"><BR>&nbsp;*&nbsp;DebugLogFormatter.java<BR>&nbsp;*&nbsp;Permission&nbsp;to&nbsp;use,&nbsp;copy,&nbsp;modify,&nbsp;and&nbsp;distribute&nbsp;this&nbsp;software<BR>&nbsp;*&nbsp;and&nbsp;its&nbsp;documentation&nbsp;for&nbsp;NON-COMMERCIAL&nbsp;purposes&nbsp;and&nbsp;without<BR>&nbsp;*&nbsp;fee&nbsp;is&nbsp;hereby&nbsp;granted&nbsp;provided&nbsp;that&nbsp;this&nbsp;copyright&nbsp;notice<BR>&nbsp;*&nbsp;appears&nbsp;in&nbsp;all&nbsp;copies.<BR>&nbsp;*<BR>&nbsp;*&nbsp;ALSAN&nbsp;WONG&nbsp;MAKES&nbsp;NO&nbsp;REPRESENTATIONS&nbsp;OR&nbsp;WARRANTIES&nbsp;ABOUT&nbsp;THE<BR>&nbsp;*&nbsp;SUITABILITY&nbsp;OF&nbsp;THE&nbsp;SOFTWARE,&nbsp;EITHER&nbsp;EXPRESS&nbsp;OR&nbsp;IMPLIED,&nbsp;INCLUDING<BR>&nbsp;*&nbsp;BUT&nbsp;NOT&nbsp;LIMITED&nbsp;TO&nbsp;THE&nbsp;IMPLIED&nbsp;WARRANTIES&nbsp;OF&nbsp;MERCHANTABILITY,<BR>&nbsp;*&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE,&nbsp;OR&nbsp;NON-INFRINGEMENT.&nbsp;ALSAN&nbsp;WONG<BR>&nbsp;*&nbsp;SHALL&nbsp;NOT&nbsp;BE&nbsp;LIABLE&nbsp;FOR&nbsp;ANY&nbsp;DAMAGES&nbsp;SUFFERED&nbsp;BY&nbsp;LICENSEE&nbsp;AS&nbsp;A&nbsp;RESULT<BR>&nbsp;*&nbsp;OF&nbsp;USING,&nbsp;MODIFYING&nbsp;OR&nbsp;DISTRIBUTING&nbsp;THIS&nbsp;SOFTWARE&nbsp;OR&nbsp;ITS&nbsp;DERIVATIVES.<BR>&nbsp;*&nbsp;<BR>&nbsp;*&nbsp;Created&nbsp;on&nbsp;2005-6-3<BR>&nbsp;*&nbsp;Copyright&nbsp;2005,&nbsp;alsan.home.net<BR>&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN><SPAN style="COLOR: #000000"><BR>package&nbsp;net.alsan.jlib.util.log;<BR><BR>import&nbsp;org.apache.log4j.Logger;<BR><BR></SPAN><SPAN style="COLOR: #008000">/*</SPAN><SPAN style="COLOR: #008000">*<BR>&nbsp;*&nbsp;<BR>&nbsp;*&nbsp;@author&nbsp;alsan<BR>&nbsp;*&nbsp;@version&nbsp;1.0<BR>&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;final&nbsp;</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;DebugLogFormatter&nbsp;extends&nbsp;IndentLogFormatter&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;DebugLogFormatter(String&nbsp;prefix)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;super(prefix);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;LogFormatter&nbsp;beginMethod(String&nbsp;method)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;beginBlock(method);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;LogFormatter&nbsp;endMethod()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;endBlock();<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR></SPAN><SPAN style="COLOR: #000000">}<BR></SPAN></DIV></DIV>
<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">测试代码：</P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; FONT-SIZE: 12px; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Verdana">
<DIV><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000">&nbsp;final&nbsp;DebugLogFormatter&nbsp;debug&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;DebugLogFormatter(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">debug</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000">&nbsp;final&nbsp;PrefixLogFormatter&nbsp;info&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;PrefixLogFormatter(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">info</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000">&nbsp;final&nbsp;Logger&nbsp;log&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;Logger.getLogger(DebugLogFormatter.</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;test1(String&nbsp;msg)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;debug.beginMethod(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">test1(String)</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(msg.equals(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">hello</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">))&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;debug.beginBlock(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">hello&nbsp;from&nbsp;boss</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log.info(info.println(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">i'm&nbsp;busy</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;debug.endBlock();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</SPAN><SPAN style="COLOR: #0000ff">else</SPAN><SPAN style="COLOR: #000000">&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;debug.beginBlock(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">zzz</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log.warn(info.println(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">the&nbsp;holiday&nbsp;is&nbsp;over!</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;debug.endBlock();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log.debug(debug.endMethod());<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;test2()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;debug.beginMethod(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">test2()</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log.info(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">do&nbsp;somethings&nbsp;others<IMG src="http://www.cnitblog.com/images/dot.gif">\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log.debug(debug.endMethod());<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;main(String[]&nbsp;args)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;test1(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">hello</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;test2();<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR></SPAN></DIV></DIV><BR>
<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">输出结果：</P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; FONT-SIZE: 12px; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Verdana">
<DIV><SPAN style="COLOR: #000000">info:&nbsp;i</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">m&nbsp;busy</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #000000">debug:&nbsp;test1(String)&nbsp;{<BR>debug:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hello&nbsp;from&nbsp;boss&nbsp;{<BR>debug:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">hello&nbsp;from&nbsp;boss</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000">debug:&nbsp;}&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">test1(String)</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #0000ff">do</SPAN><SPAN style="COLOR: #000000">&nbsp;somethings&nbsp;others<IMG src="http://www.cnitblog.com/images/dot.gif"><BR>debug:&nbsp;test2()&nbsp;{<BR>debug:&nbsp;}&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">test2()<BR></SPAN></DIV></DIV>
<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">注意：可以看到log.info的输出并不在debug的message内。因为正常程况下是不需要debug message的，所以需要配置log4j的debug输出与其它level的输出分开。另一个特点，是因为要区分print、println、append、appendln等换行行为，所以配置log4j的输出格式时，不在结尾加%n。又因为希望写出的coding比较optimize，所以其它level的结尾也不加%n，而使用其它level时，可使用PrefixLogFormatter。<BR><BR>个prifix是用来区分不同的thread，在多线程时非常有用，single thread时就可有可无。例如：DebugLogFormatter debug = new DebugLogFormatter(Thread.currentThread.getName());</P><img src ="http://www.cnitblog.com/alsan/aggbug/357.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/alsan/" target="_blank">毒菇求Buy</a> 2005-06-12 15:48 <a href="http://www.cnitblog.com/alsan/archive/2005/06/12/357.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>log4j - How to parse output to multiple files</title><link>http://www.cnitblog.com/alsan/archive/2005/06/12/356.html</link><dc:creator>毒菇求Buy</dc:creator><author>毒菇求Buy</author><pubDate>Sun, 12 Jun 2005 07:47:00 GMT</pubDate><guid>http://www.cnitblog.com/alsan/archive/2005/06/12/356.html</guid><wfw:comment>http://www.cnitblog.com/alsan/comments/356.html</wfw:comment><comments>http://www.cnitblog.com/alsan/archive/2005/06/12/356.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/alsan/comments/commentRss/356.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/alsan/services/trackbacks/356.html</trackback:ping><description><![CDATA[<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">Thanks, I find the below segment from log4j manual <BR><BR>----Note that filtering is only supported by the DOMConfigurator. The PropertyConfigurator does not support filters. That's a reason for me to migrate from log4j.properties to log4j.xml.<BR><BR>（注：以下配置曾经修改，请参看<A href="http://www.mail-archive.com/log4j-user@jakarta.apache.org/msg09720.html">原文</A>）</P>
<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana"></P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; FONT-SIZE: 12px; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Verdana">
<DIV><SPAN style="COLOR: #0000ff">&lt;?</SPAN><SPAN style="COLOR: #ff00ff">xml&nbsp;version="1.0"&nbsp;encoding="UTF-8"&nbsp;</SPAN><SPAN style="COLOR: #0000ff">?&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff">&lt;!</SPAN><SPAN style="COLOR: #ff00ff">DOCTYPE&nbsp;log4j:configuration&nbsp;SYSTEM&nbsp;"log4j.dtd"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">log4j:configuration&nbsp;</SPAN><SPAN style="COLOR: #ff0000">xmlns:log4j</SPAN><SPAN style="COLOR: #0000ff">='http://jakarta.apache.org/log4j/'&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #ff0000">&lt;appender&nbsp;name</SPAN><SPAN style="COLOR: #0000ff">="console"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;class</SPAN><SPAN style="COLOR: #0000ff">="org.apache.log4j.ConsoleAppender"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">layout&nbsp;</SPAN><SPAN style="COLOR: #ff0000">class</SPAN><SPAN style="COLOR: #0000ff">="org.apache.log4j.PatternLayout"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="ConversionPattern"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="%m"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">layout</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">appender</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">appender&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="debug.file"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;class</SPAN><SPAN style="COLOR: #0000ff">="org.apache.log4j.RollingFileAppender"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="File"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="app.debug.log"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="Append"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="false"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="Encoding"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="UTF-8"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="ImmediateFlush"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="true"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="MaxFileSize"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="1MB"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">layout&nbsp;</SPAN><SPAN style="COLOR: #ff0000">class</SPAN><SPAN style="COLOR: #0000ff">="org.apache.log4j.PatternLayout"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="ConversionPattern"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="%m"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">layout</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">filter&nbsp;</SPAN><SPAN style="COLOR: #ff0000">class</SPAN><SPAN style="COLOR: #0000ff">="org.apache.log4j.varia.LevelRangeFilter"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="levelMin"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="DEBUG"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="levelMax"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="DEBUG"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="acceptOnMatch"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="true"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">filter</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">appender</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">appender&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="info.console"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;class</SPAN><SPAN style="COLOR: #0000ff">="org.apache.log4j.ConsoleAppender"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">layout&nbsp;</SPAN><SPAN style="COLOR: #ff0000">class</SPAN><SPAN style="COLOR: #0000ff">="org.apache.log4j.PatternLayout"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="ConversionPattern"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="%m"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">layout</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">filter&nbsp;</SPAN><SPAN style="COLOR: #ff0000">class</SPAN><SPAN style="COLOR: #0000ff">="org.apache.log4j.varia.LevelRangeFilter"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="levelMin"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="INFO"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="levelMax"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="FATAL"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="acceptOnMatch"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="false"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">filter</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">appender</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">appender&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="info.file"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;class</SPAN><SPAN style="COLOR: #0000ff">="org.apache.log4j.RollingFileAppender"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="File"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="app.info.log"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="Append"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="true"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="ImmediateFlush"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="true"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="MaxFileSize"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="10MB"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">layout&nbsp;</SPAN><SPAN style="COLOR: #ff0000">class</SPAN><SPAN style="COLOR: #0000ff">="org.apache.log4j.PatternLayout"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="ConversionPattern"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="%m"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">layout</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">filter&nbsp;</SPAN><SPAN style="COLOR: #ff0000">class</SPAN><SPAN style="COLOR: #0000ff">="org.apache.log4j.varia.LevelRangeFilter"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="levelMin"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="INFO"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="levelMax"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="INFO"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="acceptOnMatch"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN style="COLOR: #0000ff">="true"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">filter</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">appender</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">logger&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="net.alsan"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;additivity</SPAN><SPAN style="COLOR: #0000ff">="false"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">level&nbsp;</SPAN><SPAN style="COLOR: #ff0000">value</SPAN><SPAN style="COLOR: #0000ff">="DEBUG"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">appender-ref&nbsp;</SPAN><SPAN style="COLOR: #ff0000">ref</SPAN><SPAN style="COLOR: #0000ff">="debug.file"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">appender-ref&nbsp;</SPAN><SPAN style="COLOR: #ff0000">ref</SPAN><SPAN style="COLOR: #0000ff">="info.console"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">logger</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">root</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">level&nbsp;</SPAN><SPAN style="COLOR: #ff0000">value</SPAN><SPAN style="COLOR: #0000ff">="ERROR"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">appender-ref&nbsp;</SPAN><SPAN style="COLOR: #ff0000">ref</SPAN><SPAN style="COLOR: #0000ff">="console"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">root</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">log4j:configuration</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN></DIV></DIV><img src ="http://www.cnitblog.com/alsan/aggbug/356.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/alsan/" target="_blank">毒菇求Buy</a> 2005-06-12 15:47 <a href="http://www.cnitblog.com/alsan/archive/2005/06/12/356.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JMagick安装（Linux版）</title><link>http://www.cnitblog.com/alsan/archive/2005/06/12/355.html</link><dc:creator>毒菇求Buy</dc:creator><author>毒菇求Buy</author><pubDate>Sun, 12 Jun 2005 07:46:00 GMT</pubDate><guid>http://www.cnitblog.com/alsan/archive/2005/06/12/355.html</guid><wfw:comment>http://www.cnitblog.com/alsan/comments/355.html</wfw:comment><comments>http://www.cnitblog.com/alsan/archive/2005/06/12/355.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.cnitblog.com/alsan/comments/commentRss/355.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/alsan/services/trackbacks/355.html</trackback:ping><description><![CDATA[<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">原以为是一项“简单任务”，结果足足玩了2天。<BR><BR>要安装JMagick，必须先安装ImageMagick。<BR><BR>ImageMagick在FC3下有RPM，所以apt-get install ImageMagick。安装测试好之后，运行jmagick的./configure，死左。它说找不到ImageMagick的api.h。<BR><BR>上JMagick的网查，有人说要安装ImageMagick-devel，OK，apt-get install ImageMagick-devel。再运行jmagick的./configure，死在之前的错误的下一句，说找不到ImageMagick的Lib所在。<BR><BR>再上网查，有人说要指定ImageMagick/lib，但是ImageMagick下根本就没有lib这个目录，死心。<BR><BR>无计，download source自己compile吧。./configure, make all, make install，测试，不支持jpeg！！？<BR><BR>再查，有人说要libjpeg, libpng, libwmf, ...但所有这些包我都有，而且昨天才用apt-get upgrade更新过系统，怎可能？<BR><BR>继续查，终于有人说出真相（都系鬼佬好，肯讲真话），要libjpg-devel, libpng-devel, ...至真！！顺便安装了jasper，可支持jpeg2000，可惜的是apt-get找不到jasper，要自己down RPM。<BR><BR>ImageMagick安装好，就再行JMagick的./configure，这次OK了:) make all，有错！！？话没有对magick_PixelPacket.c compile的rule，my god...<BR><BR>又查，有人说./configure, make all, make, cd generate, 行一个自己写的shall script，然后又...非常复杂，...<BR><BR>算，可能是中间一个step做错了，又或者这个错是个bug，已经被fix。rm -fR JMagick, cvs -d :pserver:anonyous@jmagick.yro....<BR><BR>再运行./configure, make all, 还是有错。<BR><BR>不死心，make clean, ./configure, make all, 没有出错！！！！make install, make test, 所有结果正常！！！！<BR><BR>运行我的app，出错，UnsafifiedLinkError，找不到JMagick的iso。<BR><BR>查，export LD_LIBRARY_PATH="/usr/local/lib"，BINGO！！<BR><BR>最后总结，再一次证明linux下的东西是灵活而强大的，不是linux够灵活强大，是要用linux的人要够灵活强大，否则，还是用windows吧。要我再做一次，可能就compile不过了。</P><img src ="http://www.cnitblog.com/alsan/aggbug/355.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/alsan/" target="_blank">毒菇求Buy</a> 2005-06-12 15:46 <a href="http://www.cnitblog.com/alsan/archive/2005/06/12/355.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>DIY - HttpDump</title><link>http://www.cnitblog.com/alsan/archive/2005/06/12/350.html</link><dc:creator>毒菇求Buy</dc:creator><author>毒菇求Buy</author><pubDate>Sun, 12 Jun 2005 07:42:00 GMT</pubDate><guid>http://www.cnitblog.com/alsan/archive/2005/06/12/350.html</guid><wfw:comment>http://www.cnitblog.com/alsan/comments/350.html</wfw:comment><comments>http://www.cnitblog.com/alsan/archive/2005/06/12/350.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.cnitblog.com/alsan/comments/commentRss/350.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/alsan/services/trackbacks/350.html</trackback:ping><description><![CDATA[<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">自己做个HttpDump。<BR><BR>用料好简单，<A href="http://www.winpcap.org/">WinPcap</A> + <A href="http://netresearch.ics.uci.edu/kfujii/jpcap/doc/index.html">Jpcap</A>&nbsp;(小心，Jpcap有两个，一个是sourceforge.net的，那个已经实现了一个capture client，而且功能齐全，但在Windows下要用cygwin或mingwin）。另需要<A href="http://jakarta.apache.org/commons/">Jakarta common</A>的<A href="http://jakarta.apache.org/commons/codec/">codec</A>及<A href="http://logging.apache.org/log4j/docs/index.html">log4j</A>，其它的可有可无。<BR><BR></P>
<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">HttpDump.java<BR><BR></P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; FONT-SIZE: 12px; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Verdana">
<DIV><SPAN style="COLOR: #008000">/*</SPAN><SPAN style="COLOR: #008000"><BR>&nbsp;*&nbsp;HttpDump.java&nbsp;Permission&nbsp;to&nbsp;use,&nbsp;copy,&nbsp;modify,&nbsp;and&nbsp;distribute&nbsp;this&nbsp;software<BR>&nbsp;*&nbsp;and&nbsp;its&nbsp;documentation&nbsp;for&nbsp;NON-COMMERCIAL&nbsp;purposes&nbsp;and&nbsp;without&nbsp;fee&nbsp;is&nbsp;hereby<BR>&nbsp;*&nbsp;granted&nbsp;provided&nbsp;that&nbsp;this&nbsp;copyright&nbsp;notice&nbsp;appears&nbsp;in&nbsp;all&nbsp;copies.<BR>&nbsp;*&nbsp;<BR>&nbsp;*&nbsp;ALSAN&nbsp;WONG&nbsp;MAKES&nbsp;NO&nbsp;REPRESENTATIONS&nbsp;OR&nbsp;WARRANTIES&nbsp;ABOUT&nbsp;THE&nbsp;SUITABILITY&nbsp;OF<BR>&nbsp;*&nbsp;THE&nbsp;SOFTWARE,&nbsp;EITHER&nbsp;EXPRESS&nbsp;OR&nbsp;IMPLIED,&nbsp;INCLUDING&nbsp;BUT&nbsp;NOT&nbsp;LIMITED&nbsp;TO&nbsp;THE<BR>&nbsp;*&nbsp;IMPLIED&nbsp;WARRANTIES&nbsp;OF&nbsp;MERCHANTABILITY,&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE,&nbsp;OR<BR>&nbsp;*&nbsp;NON-INFRINGEMENT.&nbsp;ALSAN&nbsp;WONG&nbsp;SHALL&nbsp;NOT&nbsp;BE&nbsp;LIABLE&nbsp;FOR&nbsp;ANY&nbsp;DAMAGES&nbsp;SUFFERED&nbsp;BY<BR>&nbsp;*&nbsp;LICENSEE&nbsp;AS&nbsp;A&nbsp;RESULT&nbsp;OF&nbsp;USING,&nbsp;MODIFYING&nbsp;OR&nbsp;DISTRIBUTING&nbsp;THIS&nbsp;SOFTWARE&nbsp;OR&nbsp;ITS<BR>&nbsp;*&nbsp;DERIVATIVES.<BR>&nbsp;*&nbsp;<BR>&nbsp;*&nbsp;Created&nbsp;on&nbsp;2005-5-28&nbsp;Copyright&nbsp;2005,&nbsp;alsan.home.net<BR>&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN><SPAN style="COLOR: #000000"><BR>package&nbsp;net.alsan.httpdump;<BR><BR>import&nbsp;jpcap.</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">;<BR><BR>import&nbsp;org.apache.log4j.Logger;<BR><BR></SPAN><SPAN style="COLOR: #008000">/*</SPAN><SPAN style="COLOR: #008000">*<BR>&nbsp;*&nbsp;<BR>&nbsp;*&nbsp;@author&nbsp;alsan<BR>&nbsp;*&nbsp;@version&nbsp;1.0<BR>&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;final&nbsp;</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;HttpDump&nbsp;implements&nbsp;JpcapHandler&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000">&nbsp;final&nbsp;Logger&nbsp;log&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;Logger.getLogger(HttpDump.</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">);<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;handlePacket(Packet&nbsp;packet)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;boolean&nbsp;capture&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">true</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(packet&nbsp;instanceof&nbsp;TCPPacket)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TCPPacket&nbsp;tcp&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;(TCPPacket)&nbsp;packet;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(</SPAN><SPAN style="COLOR: #000000">80</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">&nbsp;tcp.dst_port&nbsp;</SPAN><SPAN style="COLOR: #000000">||</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">80</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">&nbsp;tcp.src_port)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printHost(tcp);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printPacket(tcp);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;printPacket(TCPPacket&nbsp;tcp)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;tcp.data.length)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">try</SPAN><SPAN style="COLOR: #000000">&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HttpPacket&nbsp;http&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;HttpPacket(tcp.data);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http.printInfo();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</SPAN><SPAN style="COLOR: #0000ff">catch</SPAN><SPAN style="COLOR: #000000">&nbsp;(Exception&nbsp;e)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log.error(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">handlePacket(Packet)</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,&nbsp;e);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log.info(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">---------------------------------------------------------------</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;printHost(TCPPacket&nbsp;tcp)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;StringBuilder&nbsp;sb&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;StringBuilder();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sb.append(tcp.src_ip.getHostAddress()).append(tcp.src_port).append(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;-&gt;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sb.append(tcp.dst_ip.getHostAddress()).append(tcp.dst_port);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log.info(sb.toString());<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;main(String[]&nbsp;args)&nbsp;throws&nbsp;Exception&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Jpcap&nbsp;jpcap&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;Jpcap.openDevice(Jpcap.getDeviceList()[</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">],&nbsp;</SPAN><SPAN style="COLOR: #000000">1000</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #0000ff">false</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #000000">20</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jpcap.loopPacket(</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;HttpDump());<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>}<BR></SPAN></DIV></DIV>
<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana"><BR></P>
<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">HttpPacket.java<BR><BR></P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; FONT-SIZE: 12px; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Verdana">
<DIV><SPAN style="COLOR: #008000">/*</SPAN><SPAN style="COLOR: #008000"><BR>&nbsp;*&nbsp;HttpPacket.java<BR>&nbsp;*&nbsp;Permission&nbsp;to&nbsp;use,&nbsp;copy,&nbsp;modify,&nbsp;and&nbsp;distribute&nbsp;this&nbsp;software<BR>&nbsp;*&nbsp;and&nbsp;its&nbsp;documentation&nbsp;for&nbsp;NON-COMMERCIAL&nbsp;purposes&nbsp;and&nbsp;without<BR>&nbsp;*&nbsp;fee&nbsp;is&nbsp;hereby&nbsp;granted&nbsp;provided&nbsp;that&nbsp;this&nbsp;copyright&nbsp;notice<BR>&nbsp;*&nbsp;appears&nbsp;in&nbsp;all&nbsp;copies.<BR>&nbsp;*<BR>&nbsp;*&nbsp;ALSAN&nbsp;WONG&nbsp;MAKES&nbsp;NO&nbsp;REPRESENTATIONS&nbsp;OR&nbsp;WARRANTIES&nbsp;ABOUT&nbsp;THE<BR>&nbsp;*&nbsp;SUITABILITY&nbsp;OF&nbsp;THE&nbsp;SOFTWARE,&nbsp;EITHER&nbsp;EXPRESS&nbsp;OR&nbsp;IMPLIED,&nbsp;INCLUDING<BR>&nbsp;*&nbsp;BUT&nbsp;NOT&nbsp;LIMITED&nbsp;TO&nbsp;THE&nbsp;IMPLIED&nbsp;WARRANTIES&nbsp;OF&nbsp;MERCHANTABILITY,<BR>&nbsp;*&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE,&nbsp;OR&nbsp;NON-INFRINGEMENT.&nbsp;ALSAN&nbsp;WONG<BR>&nbsp;*&nbsp;SHALL&nbsp;NOT&nbsp;BE&nbsp;LIABLE&nbsp;FOR&nbsp;ANY&nbsp;DAMAGES&nbsp;SUFFERED&nbsp;BY&nbsp;LICENSEE&nbsp;AS&nbsp;A&nbsp;RESULT<BR>&nbsp;*&nbsp;OF&nbsp;USING,&nbsp;MODIFYING&nbsp;OR&nbsp;DISTRIBUTING&nbsp;THIS&nbsp;SOFTWARE&nbsp;OR&nbsp;ITS&nbsp;DERIVATIVES.<BR>&nbsp;*&nbsp;<BR>&nbsp;*&nbsp;Created&nbsp;on&nbsp;2005-5-30<BR>&nbsp;*&nbsp;Copyright&nbsp;2005,&nbsp;alsan.home.net<BR>&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN><SPAN style="COLOR: #000000"><BR>package&nbsp;net.alsan.httpdump;<BR><BR>import&nbsp;java.io.</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">;<BR><BR>import&nbsp;net.alsan.jlib.io.BufferedInputStreamReader;<BR><BR>import&nbsp;org.apache.commons.codec.binary.Hex;<BR>import&nbsp;org.apache.commons.httpclient.</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">;<BR>import&nbsp;org.apache.log4j.Logger;<BR><BR></SPAN><SPAN style="COLOR: #008000">/*</SPAN><SPAN style="COLOR: #008000">*<BR>&nbsp;*&nbsp;<BR>&nbsp;*&nbsp;@author&nbsp;alsan<BR>&nbsp;*&nbsp;@version&nbsp;1.0<BR>&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;final&nbsp;</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;HttpPacket&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000">&nbsp;final&nbsp;Logger&nbsp;log&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;Logger.getLogger(HttpPacket.</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">);<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000">[]&nbsp;data;<BR>&nbsp;&nbsp;&nbsp;&nbsp;BufferedInputStreamReader&nbsp;reader;<BR>&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;status,&nbsp;content;<BR>&nbsp;&nbsp;&nbsp;&nbsp;Header[]&nbsp;header;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;headerLen&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;lastDecodeMethod&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;0=text,&nbsp;1=bin</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;HttpPacket(</SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000">[]&nbsp;data)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">.data&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;data;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reader&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;BufferedInputStreamReader(</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;ByteArrayInputStream(data));<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;printInfo()&nbsp;throws&nbsp;IOException,&nbsp;HttpException&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decodeData();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printStatus();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printHeader();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printContent();<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;printContent()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;content)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log.info(content);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;printHeader()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;header)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;i</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">header.length;&nbsp;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;StringBuilder&nbsp;sb&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;StringBuilder();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sb.append(header[i].getName()).append(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">).append(header[i].getValue());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log.info(sb.toString());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;printStatus()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;status)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log.info(status);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;decodeData()&nbsp;throws&nbsp;IOException,&nbsp;HttpException&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(detectHeader())&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decodeHeader();<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(data.length&nbsp;</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;headerLen)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(isTextContent())&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decodeTextContent();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</SPAN><SPAN style="COLOR: #0000ff">else</SPAN><SPAN style="COLOR: #000000">&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decodeBinContent();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</SPAN><SPAN style="COLOR: #0000ff">else</SPAN><SPAN style="COLOR: #000000">&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">&nbsp;lastDecodeMethod)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;String(data);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(content.startsWith(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">GIF89a</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">))&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decodeBinContent();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</SPAN><SPAN style="COLOR: #0000ff">else</SPAN><SPAN style="COLOR: #000000">&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decodeBinContent();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;decodeBinContent()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lastDecodeMethod&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;StringBuilder&nbsp;sb&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;StringBuilder();<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">&nbsp;(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,&nbsp;cnt&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;data.length&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">&nbsp;headerLen;&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">&nbsp;cnt;&nbsp;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sb.append(Hex.encodeHex(</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000">[]&nbsp;{&nbsp;data[i&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;headerLen]&nbsp;})).append(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(</SPAN><SPAN style="COLOR: #000000">31</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">&nbsp;(i&nbsp;</SPAN><SPAN style="COLOR: #000000">%</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">32</SPAN><SPAN style="COLOR: #000000">))&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sb.append(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</SPAN><SPAN style="COLOR: #0000ff">else</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(</SPAN><SPAN style="COLOR: #000000">7</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">&nbsp;(i&nbsp;</SPAN><SPAN style="COLOR: #000000">%</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">8</SPAN><SPAN style="COLOR: #000000">))&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sb.append(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;sb.toString();<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;decodeTextContent()&nbsp;throws&nbsp;IOException&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lastDecodeMethod&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;StringBuilder&nbsp;sb&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;StringBuilder();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;line;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;(line&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;reader.readLine()))&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sb.append(line);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;sb.toString();<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;boolean&nbsp;isTextContent()&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;boolean&nbsp;textContent&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">false</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;value&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;findHeader(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Content-Type</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;value&nbsp;</SPAN><SPAN style="COLOR: #000000">&amp;&amp;</SPAN><SPAN style="COLOR: #000000">&nbsp;(value.startsWith(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">text</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #000000">||</SPAN><SPAN style="COLOR: #000000">&nbsp;value.endsWith(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">x-www-form-urlencoded</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">))&nbsp;)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;findHeader(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Content-Encoding</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">&nbsp;value&nbsp;</SPAN><SPAN style="COLOR: #000000">||</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">&nbsp;value.indexOf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">gzip</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">))&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;textContent&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">true</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;textContent;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;boolean&nbsp;detectHeader()&nbsp;throws&nbsp;IOException&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;boolean&nbsp;exist&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">false</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;line&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;reader.readLine();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;line.indexOf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">HTTP/1</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">))&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;status&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;line;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exist&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">true</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;exist;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;decodeHeader()&nbsp;throws&nbsp;IOException,&nbsp;HttpException&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String[]&nbsp;heads&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;getHeaders();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;header&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;Header[heads.length];<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;i</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">heads.length;&nbsp;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String[]&nbsp;parts&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;heads[i].split(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;parts.length)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">throw</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;HttpException(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Invalid&nbsp;HTTP&nbsp;header</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;header[i]&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;Header(parts[</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">],&nbsp;parts[</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">]);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;String[]&nbsp;getHeaders()&nbsp;throws&nbsp;IOException&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;StringBuilder&nbsp;sb&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;StringBuilder();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;line;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;(line&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;reader.readLine())&nbsp;</SPAN><SPAN style="COLOR: #000000">&amp;&amp;</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">!</SPAN><SPAN style="COLOR: #000000">line.equals(</SPAN><SPAN style="COLOR: #000000">""</SPAN><SPAN style="COLOR: #000000">))&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sb.append(line).append(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">\r\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;headerLen&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;status.length()&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;sb.length()&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">4</SPAN><SPAN style="COLOR: #000000">;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;sb.toString().split(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">\r\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;String&nbsp;findHeader(String&nbsp;name)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;value&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;i</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">header.length;&nbsp;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(header[i].getName().equalsIgnoreCase(name))&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;header[i].getValue();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">break</SPAN><SPAN style="COLOR: #000000">;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;value;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>}<BR></SPAN></DIV></DIV><img src ="http://www.cnitblog.com/alsan/aggbug/350.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/alsan/" target="_blank">毒菇求Buy</a> 2005-06-12 15:42 <a href="http://www.cnitblog.com/alsan/archive/2005/06/12/350.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JMagick的安装（Win32版）</title><link>http://www.cnitblog.com/alsan/archive/2005/06/12/347.html</link><dc:creator>毒菇求Buy</dc:creator><author>毒菇求Buy</author><pubDate>Sun, 12 Jun 2005 07:39:00 GMT</pubDate><guid>http://www.cnitblog.com/alsan/archive/2005/06/12/347.html</guid><wfw:comment>http://www.cnitblog.com/alsan/comments/347.html</wfw:comment><comments>http://www.cnitblog.com/alsan/archive/2005/06/12/347.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/alsan/comments/commentRss/347.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/alsan/services/trackbacks/347.html</trackback:ping><description><![CDATA[<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">目前可下载的JMagick版本是6.0.4，而这版本的binary distribution是为ImageMagic 6.0编驿的。非常不幸，在ImageMagic的网站只6.2可下载，只好自己compile了。<BR><BR>在compile的过程中，发现它带的make file有问题，不能顺利完成编驿的操作，例如：。</P>
<UL style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">
<LI>没有生成Magick_MagickInfo.obj 
<LI>没有生成Magick_MagickInfo.h 
<LI>Magick_ImageInfo.c中的其中一个function的定义与生成的.h不匹配</LI></UL>
<P style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">以下列出修改后的make file，方便日后使用。<BR>注：</P>
<OL style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">
<LI>所使用的C++ compiler是vs.net 2003的c++ compiler，即vc7。安装路径是c:\Program&nbsp;Files\Microsoft&nbsp;Visual&nbsp;Studio&nbsp;.NET&nbsp;2003 
<LI>所使用的jdk版本是1.5，安装路径是c:\Program Files\Java\jdk1.5.0_01，由于compile时需要include jdk的jni.h，而且完成后要自动copy到目的目录，发现copy时因为路径中有空格，需以引号括着，但以引号括着时，compile在expand compiler flags时又会出错，因此只能改以短路径名（c:\progra~1\...）代替 
<LI>输出的dll可以放到%system32%或%JRE_LIB\ext\x86 
<LI>输出的jar可以放到classpath中的任何位置</LI></OL>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV style="FONT-SIZE: 12px; FONT-FAMILY: Verdana"><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">#<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;</SPAN><SPAN style="COLOR: #000000">--</SPAN><SPAN style="COLOR: #000000">&nbsp;See&nbsp;update&nbsp;notes&nbsp;below&nbsp;</SPAN><SPAN style="COLOR: #000000">--&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;This&nbsp;makefile&nbsp;only&nbsp;compiles&nbsp;the&nbsp;C&nbsp;files&nbsp;and&nbsp;the&nbsp;generated<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;jni&nbsp;stub&nbsp;and&nbsp;headrer&nbsp;files&nbsp;and&nbsp;produces&nbsp;a&nbsp;DLL.<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;The&nbsp;java&nbsp;compilation,&nbsp;generation&nbsp;of&nbsp;the&nbsp;JAR&nbsp;file&nbsp;and&nbsp;the&nbsp;JNI&nbsp;stubs<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;still&nbsp;have&nbsp;to&nbsp;be&nbsp;done&nbsp;on&nbsp;Unix&nbsp;</SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000">&nbsp;the&nbsp;regularly&nbsp;supplied&nbsp;make<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;file.<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;Hint:&nbsp;To&nbsp;be&nbsp;placed&nbsp;</SPAN><SPAN style="COLOR: #0000ff">in</SPAN><SPAN style="COLOR: #000000">&nbsp;<IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">srm</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">magick&nbsp;and&nbsp;invoked&nbsp;from&nbsp;there,<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nmake&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">f&nbsp;Makefile.VC</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;TODO:&nbsp;Complete&nbsp;generation&nbsp;of&nbsp;JMagick&nbsp;</SPAN><SPAN style="COLOR: #0000ff">in</SPAN><SPAN style="COLOR: #000000">&nbsp;the&nbsp;NT&nbsp;Environment.<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;Author:&nbsp;IT<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;Date:&nbsp;&nbsp;&nbsp;Oct&nbsp;</SPAN><SPAN style="COLOR: #000000">2000</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;$Id:&nbsp;Makefile.all,v&nbsp;</SPAN><SPAN style="COLOR: #000000">1.2</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">2003</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">04</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">26</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">07</SPAN><SPAN style="COLOR: #000000">:</SPAN><SPAN style="COLOR: #000000">23</SPAN><SPAN style="COLOR: #000000">:</SPAN><SPAN style="COLOR: #000000">51</SPAN><SPAN style="COLOR: #000000">&nbsp;ttey&nbsp;Exp&nbsp;$<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;</SPAN><SPAN style="COLOR: #000000">--</SPAN><SPAN style="COLOR: #000000">&nbsp;Updated&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">&nbsp;Win32&nbsp;instance,&nbsp;EMXOREN&nbsp;Apr&nbsp;</SPAN><SPAN style="COLOR: #000000">09</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #000000">2002</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">--&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;</SPAN><SPAN style="COLOR: #000000">--</SPAN><SPAN style="COLOR: #000000">&nbsp;For&nbsp;runtime&nbsp;convenience&nbsp;copy&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">*.dll</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">*.jar</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">as</SPAN><SPAN style="COLOR: #000000">&nbsp;necessary.<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;</SPAN><SPAN style="COLOR: #000000">--</SPAN><SPAN style="COLOR: #000000">&nbsp;Copy&nbsp;the&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">jmagick.dll</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;to&nbsp;MAGICK_HOME&nbsp;(e.g.&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">MAGICBIN</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;below).<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;</SPAN><SPAN style="COLOR: #000000">--</SPAN><SPAN style="COLOR: #000000">&nbsp;Copy&nbsp;the&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">jmagick.jar</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;to&nbsp;JRE</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">s&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">lib</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">ext</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">.</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">#&nbsp;</SPAN><SPAN style="COLOR: #000000">--</SPAN><SPAN style="COLOR: #000000">&nbsp;Just&nbsp;always&nbsp;rebuilt&nbsp;ALL,&nbsp;it</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">s&nbsp;fast&nbsp;and&nbsp;somewhat&nbsp;fixed&nbsp;anyway!</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">#&nbsp;</SPAN><SPAN style="COLOR: #000000">--</SPAN><SPAN style="COLOR: #000000">&nbsp;Run&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">javac</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">jar</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">javah</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;respectively&nbsp;prior&nbsp;to&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">cl</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">link</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">.<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;</SPAN><SPAN style="COLOR: #000000">--</SPAN><SPAN style="COLOR: #000000">&nbsp;Disabled&nbsp;warnings&nbsp;</SPAN><SPAN style="COLOR: #0000ff">as</SPAN><SPAN style="COLOR: #000000">&nbsp;it&nbsp;was&nbsp;kind&nbsp;of&nbsp;noisy.<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;</SPAN><SPAN style="COLOR: #000000">--</SPAN><SPAN style="COLOR: #000000">&nbsp;Setup&nbsp;VC</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">&nbsp;environment&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">path</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">cl</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">link</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;and&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">lib</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">.<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;</SPAN><SPAN style="COLOR: #000000">--</SPAN><SPAN style="COLOR: #000000">&nbsp;Created&nbsp;manually&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">obj\magick</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">lib</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;place&nbsp;holders.<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;</SPAN><SPAN style="COLOR: #000000">--</SPAN><SPAN style="COLOR: #000000">&nbsp;Created&nbsp;manually&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">classes</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">generated</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">docs</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;place&nbsp;holders.<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;changed&nbsp;by&nbsp;Sava&nbsp;Slijepcevic<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>CPP</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">cl.exe<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>LINK32</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">link.exe<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>CPPINC</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">c:\Program&nbsp;Files\Microsoft&nbsp;Visual&nbsp;Studio&nbsp;.NET&nbsp;</SPAN><SPAN style="COLOR: #000000">2003</SPAN><SPAN style="COLOR: #000000">\Vc7\Include<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>CPPLIB</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">c:\Program&nbsp;Files\Microsoft&nbsp;Visual&nbsp;Studio&nbsp;.NET&nbsp;</SPAN><SPAN style="COLOR: #000000">2003</SPAN><SPAN style="COLOR: #000000">\Vc7\Lib<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>OUTDIR</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">..\lib<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>INTDIR</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">..\obj\magick<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>SRCDIR</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">..\src\magick<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>GENDIR</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">..\generated<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>CLSDIR</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">..\classes<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>DOCDIR</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">..\docs<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>JDKDIR</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">c:\progra</SPAN><SPAN style="COLOR: #000000">~</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">\Java\jdk1.</SPAN><SPAN style="COLOR: #000000">5</SPAN><SPAN style="COLOR: #000000">.0_01<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>JREDIR</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">c:\progra</SPAN><SPAN style="COLOR: #000000">~</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">\Java\jre1.</SPAN><SPAN style="COLOR: #000000">5</SPAN><SPAN style="COLOR: #000000">.0_01<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>JAVALIB</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">d:\java\lib<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>JREEXT</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">$(JREDIR)\lib\ext\x86<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>JNIINC</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">$(JDKDIR)\include<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#MAGICKDIR</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">C:\gs\ImageMagick</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">5.5</SPAN><SPAN style="COLOR: #000000">.</SPAN><SPAN style="COLOR: #000000">6</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">Q16<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>MAGICKDIR</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">c:\progra</SPAN><SPAN style="COLOR: #000000">~</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">\ImageMagick</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">6.2</SPAN><SPAN style="COLOR: #000000">.</SPAN><SPAN style="COLOR: #000000">3</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">Q16<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>MAGICKINC</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">$(MAGICKDIR)<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>MAGICKLIB</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">$(MAGICKDIR)\lib\CORE_RL_magick_.lib<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>MAGICKBIN</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">$(MAGICKDIR)<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>MAGICKINCDIR</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">$(MAGICKDIR)\include<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;Debugging,&nbsp;no&nbsp;optimizing&nbsp;and&nbsp;stack&nbsp;checks&nbsp;are&nbsp;required.<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;It&nbsp;hangs&nbsp;otherwise&nbsp;(re:&nbsp;IT)&nbsp;</SPAN><SPAN style="COLOR: #000000">!?</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>CPP_FLAGS</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">nologo&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">MTd&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">w&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">GX&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">Od&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">Ge&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">Fo</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">c&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">D&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">WIN32</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">D&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">NDEBUG</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">D&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">_WINDOWS</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">D&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">_MBCS</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">D&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">_USRDLL</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">D&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">JMAGICK_EXPORTS</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">D&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">_VISUALC_</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">I&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(CPPINC)</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">I&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(JNIINC)</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">I&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(JNIINC)/win32</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">I&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(MAGICKINC)</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">I&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(GENDIR)</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">I&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(SRCDIR)</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">I&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(MAGICKINCDIR)</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>LINK32_FLAGS</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;$(MAGICKLIB)&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">nologo&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">dll&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">incremental:no&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">machine:I386&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">libpath:</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(CPPLIB)</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #000000">:</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(OUTDIR)\jmagick.dll</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">implib:</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(OUTDIR)\jmagick.lib</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>LINK32_OBJS</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\jmagick.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\magick_Magick.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\magick_MontageInfo.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\magick_DrawInfo.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\magick_ImageInfo.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\magick_MagickImage.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\magick_PixelPacket.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\magick_QuantizeInfo.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>LINK32_OBJSD</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\jmagick.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\Magick_DrawInfo.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\Magick_ImageInfo.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\Magick_MagickImage.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\Magick_MagickInfo.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\Magick_MontageInfo.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\Magick_Magick.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\Magick_PixelPacket.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\Magick_QuantizeInfo.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>ALL&nbsp;:&nbsp;CLEAN&nbsp;CLASSES&nbsp;DOCS&nbsp;HEADERS&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(OUTDIR)\jmagick.dll</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(MAGICKBIN))\jmagick.dll</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>jmagick.obj:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(SRCDIR)\jmagick.c</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;$(CPP)&nbsp;$(CPP_PROJ)&nbsp;$</SPAN><SPAN style="COLOR: #000000">?</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>magick_DrawInfo.obj:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(SRCDIR)\magick_DrawInfo.c</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;$(CPP)&nbsp;$(CPP_PROJ)&nbsp;$</SPAN><SPAN style="COLOR: #000000">?</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>magick_ImageInfo.obj:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(SRCDIR)\magick_ImageInfo.c</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;$(CPP)&nbsp;$(CPP_PROJ)&nbsp;$</SPAN><SPAN style="COLOR: #000000">?</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>magick_Magick.obj:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(SRCDIR)\magick_Magick.c</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;$(CPP)&nbsp;$(CPP_PROJ)&nbsp;$</SPAN><SPAN style="COLOR: #000000">?</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>magick_MagickImage.obj:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(SRCDIR)\magick_MagickImage.c</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;$(CPP)&nbsp;$(CPP_PROJ)&nbsp;$</SPAN><SPAN style="COLOR: #000000">?</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>magick_MagickInfo.obj:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(SRCDIR)\magick_MagickInfo.c</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;$(CPP)&nbsp;$(CPP_PROJ)&nbsp;$</SPAN><SPAN style="COLOR: #000000">?</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>magick_MontageInfo.obj:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(SRCDIR)\magick_MontageInfo.c</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;$(CPP)&nbsp;$(CPP_PROJ)&nbsp;$</SPAN><SPAN style="COLOR: #000000">?</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>magick_PixelPacket.obj:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(SRCDIR)\magick_PixelPacket.c</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;$(CPP)&nbsp;$(CPP_PROJ)&nbsp;$</SPAN><SPAN style="COLOR: #000000">?</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>magick_QuantizeInfo.obj:&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(SRCDIR)\magick_QuantizeInfo.c</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;$(CPP)&nbsp;$(CPP_PROJ)&nbsp;$</SPAN><SPAN style="COLOR: #000000">?</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(MAGICKBIN))\jmagick.dll</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(OUTDIR)\jmagick.dll</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;copy&nbsp;$(</SPAN><SPAN style="COLOR: #000000">?</SPAN><SPAN style="COLOR: #000000">)&nbsp;$(JREEXT)<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(OUTDIR)\jmagick.dll</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;:&nbsp;$(LINK32_OBJS)<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;$(LINK32)&nbsp;$(LINK32_FLAGS)&nbsp;$(LINK32_OBJSD)<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG id=Codehighlighter1_4159_4169_Open_Image onclick="this.style.display='none'; Codehighlighter1_4159_4169_Open_Text.style.display='none'; Codehighlighter1_4159_4169_Closed_Image.style.display='inline'; Codehighlighter1_4159_4169_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_4159_4169_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_4159_4169_Closed_Text.style.display='none'; Codehighlighter1_4159_4169_Open_Image.style.display='inline'; Codehighlighter1_4159_4169_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_4159_4169_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.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_4159_4169_Open_Text><SPAN style="COLOR: #000000">{$(SRCDIR)}</SPAN></SPAN><SPAN style="COLOR: #000000">.c</SPAN><SPAN id=Codehighlighter1_4172_4182_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.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_4172_4182_Open_Text><SPAN style="COLOR: #000000">{$(INTDIR)}</SPAN></SPAN><SPAN style="COLOR: #000000">.obj::<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;$(CPP)&nbsp;$(CPP_FLAGS)&nbsp;$</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>CLEAN&nbsp;:<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">@erase&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\jmagick.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">@erase&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\magick_Magick.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">@erase&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\magick_MontageInfo.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">@erase&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\magick_DrawInfo.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">@erase&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\magick_ImageInfo.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">@erase&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\magick_MagickImage.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">@erase&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\magick_PixelPacket.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">@erase&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(INTDIR)\magick_QuantizeInfo.obj</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">@erase&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(OUTDIR)\jmagick.dll</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">@erase&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(OUTDIR)\jmagick.exp</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">@erase&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">$(OUTDIR)\jmagick.lib</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>#&nbsp;The&nbsp;following&nbsp;items&nbsp;are&nbsp;always&nbsp;rebuilt&nbsp;<IMG src="http://www.cnitblog.com/images/dot.gif"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>HEADERS&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;$(GENDIR)&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;javah&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">d&nbsp;$(GENDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">classpath&nbsp;$(CLSDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">jni&nbsp;magick.Magick<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;javah&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">d&nbsp;$(GENDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">classpath&nbsp;$(CLSDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">jni&nbsp;magick.DrawInfo<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;javah&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">d&nbsp;$(GENDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">classpath&nbsp;$(CLSDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">jni&nbsp;magick.ImageInfo<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;javah&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">d&nbsp;$(GENDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">classpath&nbsp;$(CLSDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">jni&nbsp;magick.MagickImage<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;javah&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">d&nbsp;$(GENDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">classpath&nbsp;$(CLSDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">jni&nbsp;magick.MontageInfo<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;javah&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">d&nbsp;$(GENDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">classpath&nbsp;$(CLSDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">jni&nbsp;magick.PixelPacket<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;javah&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">d&nbsp;$(GENDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">classpath&nbsp;$(CLSDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">jni&nbsp;magick.QuantizeInfo<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;javah&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">d&nbsp;$(GENDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">classpath&nbsp;$(CLSDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">jni&nbsp;magick.MagickInfo<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>CLASSES&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;$(SRCDIR)\</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">.java&nbsp;$(SRCDIR)\util\</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">.java<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;javac&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">d&nbsp;$(CLSDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">classpath&nbsp;$(SRCDIR)&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">sourcepath&nbsp;$(SRCDIR)&nbsp;$(</SPAN><SPAN style="COLOR: #000000">?</SPAN><SPAN style="COLOR: #000000">)<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;jar&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">cvf&nbsp;$(OUTDIR)</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">jmagick.jar&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">C&nbsp;$(CLSDIR)&nbsp;magick<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;copy&nbsp;$(OUTDIR)\jmagick.jar&nbsp;$(JAVALIB)<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>DOCS&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;$(DOCDIR)<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;javadoc&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">author&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">version&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">d&nbsp;$(DOCDIR)&nbsp;\<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">sourcepath&nbsp;$(SRCDIR)</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">..&nbsp;magick&nbsp;magick.util<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top></SPAN></DIV></DIV><img src ="http://www.cnitblog.com/alsan/aggbug/347.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/alsan/" target="_blank">毒菇求Buy</a> 2005-06-12 15:39 <a href="http://www.cnitblog.com/alsan/archive/2005/06/12/347.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>