mp3 cutter android
<p>Following code is working fine for me. Since I am working with android ,I can't use audiostream class.</p>

<pre><code>           File correct = new File("data1.mp3");
           File file =new File("data.mp3");
               correct.createNewFile();
           FileInputStream in = new FileInputStream(file);
           FileOutputStream out = new FileOutputStream(correct);

           byte[] buffer = new byte[in.available()];


           for(int i=0;i&lt;1000;i++){

               in.read(buffer, 0, 2048);

               out.write(buffer, 0, 2048);

           }

           in.close();
           out.close();
</code></pre>

<p>Now if I run following code , its giving error and not working</p>

<pre><code>               correct.createNewFile();
           FileInputStream in = new FileInputStream(file);
           FileOutputStream out = new FileOutputStream(correct);

           byte[] buffer = new byte[in.available()];

           in.skip(2048);
           for(int i=0;i&lt;1000;i++){

               in.read(buffer, 0, 2048);

               out.write(buffer, 0, 2048);

           }

           in.close();
           out.close();
</code></pre>

<p>Same thing here , When I run this code its giving error</p>

<pre><code>               correct.createNewFile();
           FileInputStream in = new FileInputStream(file);
           FileOutputStream out = new FileOutputStream(correct);

           byte[] buffer = new byte[in.available()];


           for(int i=0;i&lt;1000;i++){

               in.read(buffer, 0, 2048);
               in.skip(2048);
               out.write(buffer, 0, 2048);

           }

           in.close();
           out.close();
</code></pre>

<p>So my actual question is that how do you specify correct offset and get frames copied to a new mp3 file? How to get the size of the frame ? Is it necessary to have some starting important frames must be copied?</p>
