* @param props
* @throws IOException
*/
protected void loadShoutcastInfo(InputStream input, HashMap props) throws IOException
{
IcyInputStream icy = new IcyInputStream(new BufferedInputStream(input));
HashMap metadata = icy.getTagHash();
MP3Tag titleMP3Tag = icy.getTag("icy-name");
if (titleMP3Tag != null) props.put("title", ((String) titleMP3Tag.getValue()).trim());
MP3Tag[] meta = icy.getTags();
if (meta != null)
{
StringBuffer metaStr = new StringBuffer();
for (int i = 0; i < meta.length; i++)
{
String key = meta[i].getName();
String value = ((String) icy.getTag(key).getValue()).trim();
props.put("mp3.shoutcast.metadata." + key, value);
}
}
}