mp3 header reading problem in android
<p>hi
i am doing a program for reading mp3 header. i get reading source code from the <a href="http://jid3.blinkenlights.org/samples.html" rel="nofollow">site</a>.
if aware of this site or mp3 header reading. please help me.  </p>

<p>code is:</p>

<pre><code>    File oSourceFile = new File("D:\\Mp3\\a.mp3");

    // create an MP3File object representing our chosen file
    MediaFile oMediaFile = new MP3File(oSourceFile);

    // any tags read from the file are returned, in an array, in an order which you should not assume
    ID3Tag[] aoID3Tag = oMediaFile.getTags();
    // let's loop through and see what we've got
    // (NOTE:  we could also use getID3V1Tag() or getID3V2Tag() methods, if we specifically want one or the other)
    for (int i=0; i &lt; aoID3Tag.length; i++)
    {
        // check to see if we read a v1.0 tag, or a v2.3.0 tag (just for example..)
        if (aoID3Tag[i] instanceof ID3V1_0Tag)
        {
            ID3V1_0Tag oID3V1_0Tag = (ID3V1_0Tag)aoID3Tag[i];
            // does this tag happen to contain a title?
            if (oID3V1_0Tag.getTitle() != null)
            {
                System.out.println("Title = " + oID3V1_0Tag.getTitle());
            }
            // etc.
        }
        else if (aoID3Tag[i] instanceof ID3V2_3_0Tag)
        {
            ID3V2_3_0Tag oID3V2_3_0Tag = (ID3V2_3_0Tag)aoID3Tag[i];
            // check if this v2.3.0 frame contains a title, using the actual frame name
            if (oID3V2_3_0Tag.getTIT2TextInformationFrame() != null)
            {
                System.out.println("Title = " + oID3V2_3_0Tag.getTIT2TextInformationFrame().getTitle());
            }
            // but check using the convenience method if it has a year set (either way works)
            try
            {
                System.out.println("Year = " + oID3V2_3_0Tag.getYear());  // reads TYER frame
            }
            catch (ID3Exception e)
            {
                // error getting year.. if one wasn't set
                System.out.println("Could get read year from tag: " + e.toString());
            }
            // etc.
        }
    }
</code></pre>

<p>run the code i get java.lang.NoClassDefFoundError:</p>

<p>my console output:</p>

<pre><code>  Exception in thread "main" java.lang.NoClassDefFoundError: junit/framework/TestCase
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at org.blinkenlights.jid3.test.ID3Test.testWriteV1_0Tag(ID3Test.java:60)
at org.blinkenlights.jid3.test.ID3Test.main(ID3Test.java:46)
    Caused by: java.lang.ClassNotFoundException: junit.framework.TestCase
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
     --- testWriteV1_0Tag ---

at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 14 more
</code></pre>
