﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-liltos-文章分类-实际应用</title><link>http://www.blogjava.net/liltos/category/2596.html</link><description /><language>zh-cn</language><lastBuildDate>Wed, 28 Feb 2007 03:39:45 GMT</lastBuildDate><pubDate>Wed, 28 Feb 2007 03:39:45 GMT</pubDate><ttl>60</ttl><item><title>ASP 莫名其妙的错误</title><link>http://www.blogjava.net/liltos/articles/11341.html</link><dc:creator>李常黑</dc:creator><author>李常黑</author><pubDate>Sat, 27 Aug 2005 14:54:00 GMT</pubDate><guid>http://www.blogjava.net/liltos/articles/11341.html</guid><wfw:comment>http://www.blogjava.net/liltos/comments/11341.html</wfw:comment><comments>http://www.blogjava.net/liltos/articles/11341.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/liltos/comments/commentRss/11341.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/liltos/services/trackbacks/11341.html</trackback:ping><description><![CDATA[这是一个简单的测试分页的程序，代码如下：<BR>
<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><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">%@LANGUAGE</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">VBSCRIPT</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;CODEPAGE</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">936</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">%</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">!DOCTYPE&nbsp;HTML&nbsp;</SPAN><SPAN style="COLOR: #0000ff">PUBLIC</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">-//W3C//DTD&nbsp;HTML&nbsp;4.01&nbsp;Transitional//EN</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">http://www.w3.org/TR/html4/loose.dtd</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">html</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">head</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">meta&nbsp;http</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">equiv</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Content-Type</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;content</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">text/html;&nbsp;charset=gb2312</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">title</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000">测试分页</SPAN><SPAN style="COLOR: #000000">&lt;/</SPAN><SPAN style="COLOR: #000000">title</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&lt;/</SPAN><SPAN style="COLOR: #000000">head</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">body</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">%<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">dim</SPAN><SPAN style="COLOR: #000000">&nbsp;all,&nbsp;cnt,&nbsp;page,&nbsp;dig<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;dig&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">10</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">'</SPAN><SPAN style="COLOR: #008000">&nbsp;每页显示条目</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;all&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">100</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">'</SPAN><SPAN style="COLOR: #008000">&nbsp;总共的显示条目</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;cnt&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;page&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;Request.QueryString(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">page</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;pagenum&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;all</SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">dig<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;Response.Write(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">pagenum&nbsp;=&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #000000">pagenum</SPAN><SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;br&gt;page&nbsp;=&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #000000">page</SPAN><SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;br&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>%</SPAN><SPAN style="COLOR: #000000">&gt;&lt;</SPAN><SPAN style="COLOR: #000000">hr</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">%<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>cnt&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">do</SPAN><SPAN style="COLOR: #000000">&nbsp;until&nbsp;cnt&nbsp;</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;all<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;cnt</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000">(page</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">dig&nbsp;</SPAN><SPAN style="COLOR: #0000ff">and</SPAN><SPAN style="COLOR: #000000">&nbsp;cnt</SPAN><SPAN style="COLOR: #000000">&lt;=</SPAN><SPAN style="COLOR: #000000">page</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">dig&nbsp;</SPAN><SPAN style="COLOR: #0000ff">then</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;Response.Write(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">cnt&nbsp;=&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #000000">cnt&nbsp;</SPAN><SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;br&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;Response.Write(</SPAN><SPAN style="COLOR: #000000">""</SPAN><SPAN style="COLOR: #000000">)<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">end</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>cnt&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;cnt&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">loop</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">'</SPAN><SPAN style="COLOR: #008000">&nbsp;处理下一页</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(page</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">pagenum)</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">then</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">'</SPAN><SPAN style="COLOR: #008000">if&nbsp;page=pagenum&nbsp;then&nbsp;&nbsp;这样是不行滴，简直是搞笑嘛</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;nxt&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;td&nbsp;align=center&gt;已抵达最后一页&lt;/td&gt;"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">else</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;nxt&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;td&gt;&lt;div&nbsp;align=center&gt;&lt;a&nbsp;href=testPage2.asp?page=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #000000">(page</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&gt;下一页&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">end</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">'</SPAN><SPAN style="COLOR: #008000">&nbsp;处理上一页</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;page</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">then</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;bck&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;td&gt;&lt;div&nbsp;align=center&gt;&lt;a&nbsp;href=testPage2.asp?page=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #000000">(page</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&gt;上一页&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">end</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>%</SPAN><SPAN style="COLOR: #000000">&gt;&lt;</SPAN><SPAN style="COLOR: #000000">hr</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">table&nbsp;width</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">38%</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;border</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;cellspacing</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;cellpadding</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;align</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">right</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">tr</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">td</SPAN><SPAN style="COLOR: #000000">&gt;&lt;</SPAN><SPAN style="COLOR: #000000">div&nbsp;align</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">center</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&gt;&lt;</SPAN><SPAN style="COLOR: #000000">a&nbsp;href</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">testPage2.asp?page=1</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000">首页</SPAN><SPAN style="COLOR: #000000">&lt;/</SPAN><SPAN style="COLOR: #000000">a</SPAN><SPAN style="COLOR: #000000">&gt;&lt;/</SPAN><SPAN style="COLOR: #000000">div</SPAN><SPAN style="COLOR: #000000">&gt;&lt;/</SPAN><SPAN style="COLOR: #000000">td</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">%</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">bck%</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">%</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">nxt%</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;/</SPAN><SPAN style="COLOR: #000000">tr</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&lt;/</SPAN><SPAN style="COLOR: #000000">table</SPAN><SPAN style="COLOR: #000000">&gt;&lt;/</SPAN><SPAN style="COLOR: #000000">body</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&lt;/</SPAN><SPAN style="COLOR: #000000">html</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN></DIV></DIV><BR>今晚决定把这个搞出来，本以为要写到下半夜的，不过，嘿嘿，本人还是比较不笨滴，没花多少就把它整出来了，高兴之余，就是为这个奇怪的 bug 犯糊涂了。<img src ="http://www.blogjava.net/liltos/aggbug/11341.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/liltos/" target="_blank">李常黑</a> 2005-08-27 22:54 <a href="http://www.blogjava.net/liltos/articles/11341.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MP3的一些资料</title><link>http://www.blogjava.net/liltos/articles/9503.html</link><dc:creator>李常黑</dc:creator><author>李常黑</author><pubDate>Sun, 07 Aug 2005 02:28:00 GMT</pubDate><guid>http://www.blogjava.net/liltos/articles/9503.html</guid><wfw:comment>http://www.blogjava.net/liltos/comments/9503.html</wfw:comment><comments>http://www.blogjava.net/liltos/articles/9503.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/liltos/comments/commentRss/9503.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/liltos/services/trackbacks/9503.html</trackback:ping><description><![CDATA[只知道这个描述语言不是JAVA、C，是什么不知道，但大概就是这个样子，没啥难度。<BR><BR>
<H3>ID3v1 Tags</H3>
<P>## 因为 ID3v2 比较复杂，连FOOBAR都不支持它，我想写的东西也就不支持算了，免得麻烦<BR>## <EM>怎么感觉这里不是这样呢，上次看到的是 ID3v1 是在文件的头部的，用UE打开MP3好像也是在头部</EM><BR>The ID3v1 tag is found at the end of an MP3 file and has a fixed number of fields and size. The structure of the tag is as follows:</P><PRE>Private Type MP3ID3V1Tag
  Tag As String * 3           '-- 03 = "TAG"
  Title As String * 30        '-- 33
  Artist As String * 30       '-- 63
  Album As String * 30        '-- 93
  Year As String * 4          '-- 97
  Comment As String * 30      '-- 127
  Genre As Byte               '-- 128
End Type
</PRE>
<P>Note that v1.1 of the ID3v1 specification allows the last two bytes of the Comment tag to be used to store the track number. Byte 29 is always set to 0 in this case, and Byte 30 stores the track number itself.</P>
<P>Checking if an MP3 file contains an ID3v1 tag is a simple matter of rewinding 128 bytes from the end and checking if the bytes read "TAG". If they do, then the rest of the bytes are the tag itself. Reading and writing the tag is simple: if its already there, then you just fill in the structure and then write it over the last 128 bytes of the file. If the tag isn't there, then just append a structure to the end of the file.<BR><BR>###&nbsp; 下面的资料是在这个地方找的，<A href="http://www.dv.co.yu/mpgscript/mpeghdr.htm">http://www.dv.co.yu/mpgscript/mpeghdr.htm</A>，更多资料可以要查看</P>
<H2 align=center><FONT size=5><B>MPEG Audio Tag ID3v1</B></FONT> </H2>
<LI>
<P>The TAG is used to describe the MPEG Audio file. It contains information about artist, title, album, publishing year and genre. There is some extra space for comments. It is exactly 128 bytes long and is located at very end of the audio data. You can get it by reading the last 128 bytes of the MPEG audio file. </P></LI><BR>## 在昨天写的那个程序中，如果把读进来的 String tag 都打印出来的话，可以看到一些效果，当然，那些东西是复制不出来的，只可以自己运行出来看<FONT size=5><B><BR>
<P align=center><TT>AAABBBBB BBBBBBBB BBBBBBBB BBBBBBBB<BR>BCCCCCCC CCCCCCCC CCCCCCCC CCCCCCCD<BR>DDDDDDDD DDDDDDDD DDDDDDDD DDDDDEEE<BR>EFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFG<BR></P></TT></B></FONT>
<P align=center></P>
<CENTER>
<TABLE style="WIDTH: 649px; HEIGHT: 243px" width=649 border=0>
<TBODY>
<TR vAlign=top bgColor=#e2e2e2>
<TD>
<P align=center>Sign</P></TD>
<TD>Length<BR>(bytes)</TD>
<TD>Position<BR>(bytes)</TD>
<TD>Description</TD></TR>
<TR vAlign=top>
<TD>A</TD>
<TD>3</TD>
<TD>(0-2)</TD>
<TD>Tag identification. Must contain 'TAG' if tag exists and is correct.</TD></TR>
<TR>
<TD>B</TD>
<TD>30</TD>
<TD>(3-32)</TD>
<TD>Title</TD></TR>
<TR>
<TD>C</TD>
<TD>30</TD>
<TD>(33-62)</TD>
<TD>Artist</TD></TR>
<TR>
<TD>D</TD>
<TD>30</TD>
<TD>(63-92)</TD>
<TD>Album</TD></TR>
<TR>
<TD>E</TD>
<TD>4</TD>
<TD>(93-96)</TD>
<TD>Year</TD></TR>
<TR>
<TD>F</TD>
<TD>30</TD>
<TD>(97-126)</TD>
<TD>Comment</TD></TR>
<TR>
<TD>G</TD>
<TD>1</TD>
<TD>(127)</TD>
<TD>Genre</TD></TR></TBODY></TABLE></CENTER>
<P>## 这里提了，它用的编码与汉字的编码是不一样滴，所以我昨天写的那个程序没拿带中文的标签来做实验，呵呵，需要转换一下<BR>The specification asks for all fields to be padded with null character (ASCII 0). However, not all applications respect this (an example is WinAmp which pads fields with <SPACE>, ASCII 32). 
<P>There is a small change proposed in <B>ID3v1.1</B> structure. The last byte of the Comment field may be used to specify the track number of a song in an album. It should contain a null character (ASCII 0) if the information is unknown. 
<H2>Genre Bytes</H2></LI>
<UL>再加一些其它的资料，可能只是比较有利于阅读而以<BR>Genre is a numeric field which may have one of the following values: </UL>
<LI>
<CENTER>
<TABLE width="90%" border=0>
<TBODY>
<TR>
<TD width="1%">0</TD>
<TD width="20%">'Blues'</TD>
<TD width="1%">20</TD>
<TD width="20%">'Alternative'</TD>
<TD width="1%">40</TD>
<TD width="20%">'AlternRock'</TD>
<TD width="1%">60</TD>
<TD width="20%">'Top 40'</TD></TR>
<TR>
<TD>1</TD>
<TD>'Classic Rock'</TD>
<TD>21</TD>
<TD>'Ska'</TD>
<TD>41</TD>
<TD>'Bass'</TD>
<TD>61</TD>
<TD>'Christian Rap'</TD></TR>
<TR>
<TD>2</TD>
<TD>'Country'</TD>
<TD>22</TD>
<TD>'Death Metal'</TD>
<TD>42</TD>
<TD>'Soul'</TD>
<TD>62</TD>
<TD>'Pop/Funk'</TD></TR>
<TR>
<TD>3</TD>
<TD>'Dance'</TD>
<TD>23</TD>
<TD>'Pranks'</TD>
<TD>43</TD>
<TD>'Punk'</TD>
<TD>63</TD>
<TD>'Jungle'</TD></TR>
<TR>
<TD>4</TD>
<TD>'Disco'</TD>
<TD>24</TD>
<TD>'Soundtrack'</TD>
<TD>44</TD>
<TD>'Space'</TD>
<TD>64</TD>
<TD>'Native American'</TD></TR>
<TR>
<TD>5</TD>
<TD>'Funk'</TD>
<TD>25</TD>
<TD>'Euro-Techno'</TD>
<TD>45</TD>
<TD>'Meditative'</TD>
<TD>65</TD>
<TD>'Cabaret'</TD></TR>
<TR>
<TD>6</TD>
<TD>'Grunge'</TD>
<TD>26</TD>
<TD>'Ambient'</TD>
<TD>46</TD>
<TD>'Instrumental Pop'</TD>
<TD>66</TD>
<TD>'New Wave'</TD></TR>
<TR>
<TD>7</TD>
<TD>'Hip-Hop'</TD>
<TD>27</TD>
<TD>'Trip-Hop'</TD>
<TD>47</TD>
<TD>'Instrumental Rock'</TD>
<TD>67</TD>
<TD>'Psychadelic'</TD></TR>
<TR>
<TD>8</TD>
<TD>'Jazz'</TD>
<TD>28</TD>
<TD>'Vocal'</TD>
<TD>48</TD>
<TD>'Ethnic'</TD>
<TD>68</TD>
<TD>'Rave'</TD></TR>
<TR>
<TD>9</TD>
<TD>'Metal'</TD>
<TD>29</TD>
<TD>'Jazz+Funk'</TD>
<TD>49</TD>
<TD>'Gothic'</TD>
<TD>69</TD>
<TD>'Showtunes'</TD></TR>
<TR>
<TD>10</TD>
<TD>'New Age'</TD>
<TD>30</TD>
<TD>'Fusion'</TD>
<TD>50</TD>
<TD>'Darkwave'</TD>
<TD>70</TD>
<TD>'Trailer'</TD></TR>
<TR>
<TD>11</TD>
<TD>'Oldies'</TD>
<TD>31</TD>
<TD>'Trance'</TD>
<TD>51</TD>
<TD>'Techno-Industrial'</TD>
<TD>71</TD>
<TD>'Lo-Fi'</TD></TR>
<TR>
<TD>12</TD>
<TD>'Other'</TD>
<TD>32</TD>
<TD>'Classical'</TD>
<TD>52</TD>
<TD>'Electronic'</TD>
<TD>72</TD>
<TD>'Tribal'</TD></TR>
<TR>
<TD>13</TD>
<TD>'Pop'</TD>
<TD>33</TD>
<TD>'Instrumental'</TD>
<TD>53</TD>
<TD>'Pop-Folk'</TD>
<TD>73</TD>
<TD>'Acid Punk'</TD></TR>
<TR>
<TD>14</TD>
<TD>'R&amp;B'</TD>
<TD>34</TD>
<TD>'Acid'</TD>
<TD>54</TD>
<TD>'Eurodance'</TD>
<TD>74</TD>
<TD>'Acid Jazz'</TD></TR>
<TR>
<TD>15</TD>
<TD>'Rap'</TD>
<TD>35</TD>
<TD>'House'</TD>
<TD>55</TD>
<TD>'Dream'</TD>
<TD>75</TD>
<TD>'Polka'</TD></TR>
<TR>
<TD>16</TD>
<TD>'Reggae'</TD>
<TD>36</TD>
<TD>'Game'</TD>
<TD>56</TD>
<TD>'Southern Rock'</TD>
<TD>76</TD>
<TD>'Retro'</TD></TR>
<TR>
<TD>17</TD>
<TD>'Rock'</TD>
<TD>37</TD>
<TD>'Sound Clip'</TD>
<TD>57</TD>
<TD>'Comedy'</TD>
<TD>77</TD>
<TD>'Musical'</TD></TR>
<TR>
<TD>18</TD>
<TD>'Techno'</TD>
<TD>38</TD>
<TD>'Gospel'</TD>
<TD>58</TD>
<TD>'Cult'</TD>
<TD>78</TD>
<TD>'Rock &amp; Roll'</TD></TR>
<TR>
<TD>19</TD>
<TD>'Industrial'</TD>
<TD>39</TD>
<TD>'Noise'</TD>
<TD>59</TD>
<TD>'Gangsta'</TD>
<TD>79</TD>
<TD>'Hard Rock'</TD></TR></TBODY></TABLE>
<DIV align=left><BR>WinAmp expanded this table with next codes: </DIV>
<TABLE width="90%" border=0>
<TBODY>
<TR>
<TD width="1%">80</TD>
<TD width="20%">'Folk'</TD>
<TD>92</TD>
<TD>'Progressive Rock'</TD>
<TD>104</TD>
<TD>'Chamber Music'</TD>
<TD>116</TD>
<TD>'Ballad'</TD></TR>
<TR>
<TD>81</TD>
<TD>'Folk-Rock'</TD>
<TD width="1%">93</TD>
<TD width="20%">'Psychedelic Rock'</TD>
<TD>105</TD>
<TD>'Sonata'</TD>
<TD>117</TD>
<TD>'Poweer Ballad'</TD></TR>
<TR>
<TD>82</TD>
<TD>'National Folk'</TD>
<TD>94</TD>
<TD>'Symphonic Rock'</TD>
<TD width="1%">106</TD>
<TD width="20%">'Symphony'</TD>
<TD>118</TD>
<TD>'Rhytmic Soul'</TD></TR>
<TR>
<TD>83</TD>
<TD>'Swing'</TD>
<TD>95</TD>
<TD>'Slow Rock'</TD>
<TD>107</TD>
<TD>'Booty Brass'</TD>
<TD width="1%">119</TD>
<TD width="20%">'Freestyle'</TD></TR>
<TR>
<TD>84</TD>
<TD>'Fast Fusion'</TD>
<TD>96</TD>
<TD>'Big Band'</TD>
<TD>108</TD>
<TD>'Primus'</TD>
<TD>120</TD>
<TD>'Duet'</TD></TR>
<TR>
<TD>85</TD>
<TD>'Bebob'</TD>
<TD>97</TD>
<TD>'Chorus'</TD>
<TD>109</TD>
<TD>'Porn Groove'</TD>
<TD>121</TD>
<TD>'Punk Rock'</TD></TR>
<TR>
<TD>86</TD>
<TD>'Latin'</TD>
<TD>98</TD>
<TD>'Easy Listening'</TD>
<TD>110</TD>
<TD>'Satire'</TD>
<TD>122</TD>
<TD>'Drum Solo'</TD></TR>
<TR>
<TD>87</TD>
<TD>'Revival'</TD>
<TD>99</TD>
<TD>'Acoustic'</TD>
<TD>111</TD>
<TD>'Slow Jam'</TD>
<TD>123</TD>
<TD>'A Capela'</TD></TR>
<TR>
<TD>88</TD>
<TD>'Celtic'</TD>
<TD>100</TD>
<TD>'Humour'</TD>
<TD>112</TD>
<TD>'Club'</TD>
<TD>124</TD>
<TD>'Euro-House'</TD></TR>
<TR>
<TD>89</TD>
<TD>'Bluegrass'</TD>
<TD>101</TD>
<TD>'Speech'</TD>
<TD>113</TD>
<TD>'Tango'</TD>
<TD>125</TD>
<TD>'Dance Hall'</TD></TR>
<TR>
<TD>90</TD>
<TD>'Avantgarde'</TD>
<TD>102</TD>
<TD>'Chanson'</TD>
<TD>114</TD>
<TD>'Samba'</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD></TR>
<TR>
<TD>91</TD>
<TD>'Gothic Rock'</TD>
<TD>103</TD>
<TD>'Opera'</TD>
<TD>115</TD>
<TD>'Folklore'</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD></TR>
<TR>
<TD colSpan=8>Any other value should be considered as 'Unknown' </TD></TR></TBODY></TABLE></CENTER>
<UL></UL></LI><img src ="http://www.blogjava.net/liltos/aggbug/9503.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/liltos/" target="_blank">李常黑</a> 2005-08-07 10:28 <a href="http://www.blogjava.net/liltos/articles/9503.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>读 MP3 文件的头信息(ID3V1)</title><link>http://www.blogjava.net/liltos/articles/9451.html</link><dc:creator>李常黑</dc:creator><author>李常黑</author><pubDate>Fri, 05 Aug 2005 22:23:00 GMT</pubDate><guid>http://www.blogjava.net/liltos/articles/9451.html</guid><wfw:comment>http://www.blogjava.net/liltos/comments/9451.html</wfw:comment><comments>http://www.blogjava.net/liltos/articles/9451.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/liltos/comments/commentRss/9451.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/liltos/services/trackbacks/9451.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">累是挺累的，不过还是感觉很有激情！</SPAN><SPAN lang=EN-US><BR></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">写这个读</SPAN><SPAN lang=EN-US>MP3</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件</SPAN><SPAN lang=EN-US>ID3V1</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的一点信息的，感觉不错！</SPAN><SPAN lang=EN-US><BR></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">最近在用</SPAN><SPAN lang=EN-US> Swing </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">写一个</SPAN><SPAN lang=EN-US>MP3</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件根据标签信息重命名的程序，这么一听的话感觉好像不是很难，但实际过程中却遇到了很多问题，都有待于我一个一个去解决！</SPAN><SPAN lang=EN-US><BR></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这次在寻找帮助时有一个犯了个很大的毛病就是没有把一些好的文章存或者是链接下来。</SPAN><SPAN lang=EN-US><BR></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">别的先不说的，先把读</SPAN><SPAN lang=EN-US>MP3</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件头部信息的程序贴出来：</P>
<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: 100%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG id=Codehighlighter1_0_52_Open_Image onclick="this.style.display='none'; Codehighlighter1_0_52_Open_Text.style.display='none'; Codehighlighter1_0_52_Closed_Image.style.display='inline'; Codehighlighter1_0_52_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_0_52_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_0_52_Closed_Text.style.display='none'; Codehighlighter1_0_52_Open_Image.style.display='inline'; Codehighlighter1_0_52_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top><SPAN id=Codehighlighter1_0_52_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">/**/</SPAN><SPAN id=Codehighlighter1_0_52_Open_Text><SPAN style="COLOR: #008000">/*</SPAN><SPAN style="COLOR: #008000">*<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;*&nbsp;Created&nbsp;on&nbsp;2005-8-6&nbsp;5:10:29<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;*&nbsp;@author&nbsp;糊涂鬼<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG id=Codehighlighter1_84_1792_Open_Image onclick="this.style.display='none'; Codehighlighter1_84_1792_Open_Text.style.display='none'; Codehighlighter1_84_1792_Closed_Image.style.display='inline'; Codehighlighter1_84_1792_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_84_1792_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_84_1792_Closed_Text.style.display='none'; Codehighlighter1_84_1792_Open_Image.style.display='inline'; Codehighlighter1_84_1792_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;ReadMp3ID3v1Info&nbsp;</SPAN><SPAN id=Codehighlighter1_84_1792_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_84_1792_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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;final&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;TAG_SIZE&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">128</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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;final&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;TITLE_SIZE&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">30</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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;final&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;ARTIST_SIZE&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">30</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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;final&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;ALBUM_SIZE&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">30</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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;final&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;YEAR_SIZE&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">4</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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;final&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;COMMENT_SIZE&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">29</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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;final&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;TRACK_LOCATION&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">126</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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;final&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;GENRE_LOCATION&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">127</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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;final&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;MAX_GENRE&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">255</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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;final&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;MAX_TRACK&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">255</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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;final&nbsp;String&nbsp;ENC_TYPE&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Cp437</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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;final&nbsp;String&nbsp;TAG_START&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">TAG</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG id=Codehighlighter1_664_1790_Open_Image onclick="this.style.display='none'; Codehighlighter1_664_1790_Open_Text.style.display='none'; Codehighlighter1_664_1790_Closed_Image.style.display='inline'; Codehighlighter1_664_1790_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_664_1790_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_664_1790_Closed_Text.style.display='none'; Codehighlighter1_664_1790_Open_Image.style.display='inline'; Codehighlighter1_664_1790_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&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)</SPAN><SPAN id=Codehighlighter1_664_1790_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_664_1790_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG id=Codehighlighter1_672_1761_Open_Image onclick="this.style.display='none'; Codehighlighter1_672_1761_Open_Text.style.display='none'; Codehighlighter1_672_1761_Closed_Image.style.display='inline'; Codehighlighter1_672_1761_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_672_1761_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_672_1761_Closed_Text.style.display='none'; Codehighlighter1_672_1761_Open_Image.style.display='inline'; Codehighlighter1_672_1761_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">try</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN id=Codehighlighter1_672_1761_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_672_1761_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File&nbsp;mp3&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;File(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">F:/音乐/MP3/英文女歌手/Madonna&nbsp;-&nbsp;Music.mp3</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RandomAccessFile&nbsp;raf&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;RandomAccessFile(&nbsp;mp3,&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">r</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raf.seek(raf.length()&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">&nbsp;TAG_SIZE);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000">[]&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;</SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000">[TAG_SIZE];<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raf.read(buf,&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,&nbsp;TAG_SIZE);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;tag&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(buf,&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,&nbsp;TAG_SIZE,&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Cp437</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;start&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;TAG_START.length();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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">文件名:&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;mp3.getName());<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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">标题&nbsp;&nbsp;：&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;tag.substring(start,&nbsp;start&nbsp;</SPAN><SPAN style="COLOR: #000000">+=</SPAN><SPAN style="COLOR: #000000">&nbsp;TITLE_SIZE).trim());<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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">艺术家：&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;tag.substring(start,&nbsp;start&nbsp;</SPAN><SPAN style="COLOR: #000000">+=</SPAN><SPAN style="COLOR: #000000">&nbsp;ARTIST_SIZE).trim());<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raf.close();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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">====================================</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File&nbsp;mp32&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;File(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">F:/音乐/MP3/英文组合/blue&nbsp;-&nbsp;you&nbsp;make&nbsp;me&nbsp;wanna.mp3</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raf&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;RandomAccessFile(&nbsp;mp32,&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">r</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raf.seek(raf.length()&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">128</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raf.read(buf,&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #000000">128</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tag&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(buf,&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #000000">128</SPAN><SPAN style="COLOR: #000000">,&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Cp437</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;start&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;TAG_START.length();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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">文件名:&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;mp32.getName());<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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">标题&nbsp;&nbsp;：&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;tag.substring(start,&nbsp;start&nbsp;</SPAN><SPAN style="COLOR: #000000">+=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">30</SPAN><SPAN style="COLOR: #000000">).trim());<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&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">艺术家：&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;tag.substring(start,&nbsp;start&nbsp;</SPAN><SPAN style="COLOR: #000000">+=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">30</SPAN><SPAN style="COLOR: #000000">).trim());<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raf.close();<BR><IMG id=Codehighlighter1_1783_1787_Open_Image onclick="this.style.display='none'; Codehighlighter1_1783_1787_Open_Text.style.display='none'; Codehighlighter1_1783_1787_Closed_Image.style.display='inline'; Codehighlighter1_1783_1787_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1783_1787_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1783_1787_Closed_Text.style.display='none'; Codehighlighter1_1783_1787_Open_Image.style.display='inline'; Codehighlighter1_1783_1787_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">catch</SPAN><SPAN style="COLOR: #000000">&nbsp;(Exception&nbsp;e)&nbsp;</SPAN><SPAN id=Codehighlighter1_1783_1787_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1783_1787_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN></DIV></DIV>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left></SPAN></P>
<P><FONT face=宋体>运行的结果是：</FONT><SPAN lang=EN-US><BR><FONT face=宋体>文件名:&nbsp; Madonna - Music.mp3<BR>标题&nbsp; ： Music<BR>艺术家： Madonna<BR>====================================<BR>文件名:&nbsp; blue - you make me wanna.mp3<BR>标题&nbsp; ： U Make Me Wanna<BR>艺术家： Blue</FONT></SPAN></P><img src ="http://www.blogjava.net/liltos/aggbug/9451.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/liltos/" target="_blank">李常黑</a> 2005-08-06 06:23 <a href="http://www.blogjava.net/liltos/articles/9451.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>