<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Random MP3 metadata code</title>
	<atom:link href="http://nicklothian.com/blog/2009/03/18/random-mp3-metadata-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://nicklothian.com/blog/2009/03/18/random-mp3-metadata-code/</link>
	<description>My Blog, Take 4</description>
	<lastBuildDate>Wed, 18 Jan 2012 14:08:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Pixonit</title>
		<link>http://nicklothian.com/blog/2009/03/18/random-mp3-metadata-code/comment-page-1/#comment-777</link>
		<dc:creator>Pixonit</dc:creator>
		<pubDate>Sat, 28 Aug 2010 01:31:02 +0000</pubDate>
		<guid isPermaLink="false">http://nicklothian.com/blog/?p=364#comment-777</guid>
		<description>Thank you for your article, was very util for me !!
I did changed this for get the icy-metaint header.

final static public String BITERATE_HEADER =  &quot;icy-metaint&quot;;
String metaInterval = con.getHeaderField(BITERATE_HEADER);

instead

StringBuilder headers = new StringBuilder();
	char c;
	while ((c = (char)in.read()) != -1) {
		headers.append(c);
		if (headers.length() &gt; 5 &amp;&amp; (headers.substring((headers.length() - 4), headers.length()).equals(&quot;\r\n\r\n&quot;))) {
			// end of headers
			break;
		}
	}

	//System.out.println(headers);
	// headers look like this:
	//		ICY 200 OK
	//		icy-notice1: 
This stream requires Winamp

	//		icy-notice2: Firehose Ultravox/SHOUTcast Relay Server/Linux v2.6.0

	//		icy-name: .977 The 80s Channel
	//		icy-genre: 80s Pop Rock
	//		icy-url: http://www.977music.com
	//		content-type: audio/mpeg
	//		icy-pub: 1
	//		icy-metaint: 16384
	//		icy-br: 128

	Pattern p = Pattern.compile(&quot;\\r\\n(icy-metaint):\\s*(.*)\\r\\n&quot;);
	Matcher m = p.matcher(headers.toString());
	if (m.find()) {
		metaIntervalString = m.group(2);
	}


Thanks a Lot !!</description>
		<content:encoded><![CDATA[<p>Thank you for your article, was very util for me !!<br />
I did changed this for get the icy-metaint header.</p>
<p>final static public String BITERATE_HEADER =  &#8220;icy-metaint&#8221;;<br />
String metaInterval = con.getHeaderField(BITERATE_HEADER);</p>
<p>instead</p>
<p>StringBuilder headers = new StringBuilder();<br />
	char c;<br />
	while ((c = (char)in.read()) != -1) {<br />
		headers.append(c);<br />
		if (headers.length() &gt; 5 &amp;&amp; (headers.substring((headers.length() &#8211; 4), headers.length()).equals(&#8220;\r\n\r\n&#8221;))) {<br />
			// end of headers<br />
			break;<br />
		}<br />
	}</p>
<p>	//System.out.println(headers);<br />
	// headers look like this:<br />
	//		ICY 200 OK<br />
	//		icy-notice1:<br />
This stream requires Winamp</p>
<p>	//		icy-notice2: Firehose Ultravox/SHOUTcast Relay Server/Linux v2.6.0</p>
<p>	//		icy-name: .977 The 80s Channel<br />
	//		icy-genre: 80s Pop Rock<br />
	//		icy-url: <a href="http://www.977music.com" rel="nofollow">http://www.977music.com</a><br />
	//		content-type: audio/mpeg<br />
	//		icy-pub: 1<br />
	//		icy-metaint: 16384<br />
	//		icy-br: 128</p>
<p>	Pattern p = Pattern.compile(&#8220;\\r\\n(icy-metaint):\\s*(.*)\\r\\n&#8221;);<br />
	Matcher m = p.matcher(headers.toString());<br />
	if (m.find()) {<br />
		metaIntervalString = m.group(2);<br />
	}</p>
<p>Thanks a Lot !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sbm</title>
		<link>http://nicklothian.com/blog/2009/03/18/random-mp3-metadata-code/comment-page-1/#comment-746</link>
		<dc:creator>sbm</dc:creator>
		<pubDate>Tue, 16 Mar 2010 19:43:36 +0000</pubDate>
		<guid isPermaLink="false">http://nicklothian.com/blog/?p=364#comment-746</guid>
		<description>ok, let it be known, i&#039;m new to java. i think the code above does exactly what i&#039;ve been trying to implement: grabbing metadata info off an online mp3 stream (song name, station, etc). problem is, i&#039;m not too sure how to actually use the code above... assuming that is straight java, does it require some external class file or similar? if so, can i get a copy of that from you?

thanx</description>
		<content:encoded><![CDATA[<p>ok, let it be known, i&#8217;m new to java. i think the code above does exactly what i&#8217;ve been trying to implement: grabbing metadata info off an online mp3 stream (song name, station, etc). problem is, i&#8217;m not too sure how to actually use the code above&#8230; assuming that is straight java, does it require some external class file or similar? if so, can i get a copy of that from you?</p>
<p>thanx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cc</title>
		<link>http://nicklothian.com/blog/2009/03/18/random-mp3-metadata-code/comment-page-1/#comment-679</link>
		<dc:creator>cc</dc:creator>
		<pubDate>Sat, 17 Oct 2009 07:08:30 +0000</pubDate>
		<guid isPermaLink="false">http://nicklothian.com/blog/?p=364#comment-679</guid>
		<description>Wow, exactly what i searched for !

I have some question about the integration into a web page, could you help me ?

Thanks</description>
		<content:encoded><![CDATA[<p>Wow, exactly what i searched for !</p>
<p>I have some question about the integration into a web page, could you help me ?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 1337700640.595 seconds -->

