com.limegroup.gnutella.mp3
Class ID3Reader

java.lang.Object
  extended bycom.limegroup.gnutella.mp3.ID3Reader

public final class ID3Reader
extends java.lang.Object

Provides a utility method to read ID3 Tag information from MP3 files and creates GMLDocuments from them.


Method Summary
static LimeXMLDocument fixCorruption(LimeXMLDocument oldDoc)
          Creates a new LimeXMLDocument without corruption.
static java.lang.String getGenreString(short genre)
          Takes a short and returns the corresponding genre string
static boolean isCorrupted(LimeXMLDocument doc)
          Determines whether a LimeXMLDocument was corrupted by ID3Editor in the past.
static LimeXMLDocument readDocument(java.io.File file)
           
static java.lang.String readDocument(java.io.File file, boolean solo)
          Attempts to read an ID3 tag from the specified file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isCorrupted

public static boolean isCorrupted(LimeXMLDocument doc)
Determines whether a LimeXMLDocument was corrupted by ID3Editor in the past.


fixCorruption

public static LimeXMLDocument fixCorruption(LimeXMLDocument oldDoc)
Creates a new LimeXMLDocument without corruption.


readDocument

public static java.lang.String readDocument(java.io.File file,
                                            boolean solo)
                                     throws java.io.IOException
Attempts to read an ID3 tag from the specified file.

Returns:
an null if the document has no ID3 tag
Throws:
java.io.IOException

readDocument

public static LimeXMLDocument readDocument(java.io.File file)
                                    throws java.io.IOException
Throws:
java.io.IOException

getGenreString

public static java.lang.String getGenreString(short genre)
Takes a short and returns the corresponding genre string