title: Split a file into four parts
body: <p>I want to split a file(suppose a mp3) into four parts.I have tried this code. But only File1.mp3 is working properly. I can't able to play others.What i am doing wrong here?</p>
  
  <pre><code>try     {
  
          FileInputStream in=new FileInputStream(f);
          long i=f.length();
          long j=i/4;
  
          FileOutputStream f0=new FileOutputStream("File1.mp3");
          FileOutputStream f1=new FileOutputStream("File2.mp3");
          FileOutputStream f2=new FileOutputStream("File3.mp3");
          FileOutputStream f3=new FileOutputStream("File4.mp3");
  
          for(long k=0;k&lt;j;k++){
              f0.write(in.read());
          }
          f0.close();
          for(long l=0;l&lt;j;l++){
              f1.write(in.read());
          }
          f1.close();
          for(long m=0;m&lt;j;m++){
              f2.write(in.read());  
          }
          f2.close();
          for(long n=0;n&lt;j;n++){
              f3.write(in.read());
          }
          f3.close();
  
          in.close();
      }
      catch (IOException e)
      {
  
      }
  </code></pre>