Concatenate mp3 files in Java
问题 I have some problem with concatenation mp3 files. For example, I have 5 mp3 files. And I want concatenate them to one file. I try this: try { InputStream in = new FileInputStream("C:/a.mp3"); byte[] buffer = new byte[1024]; OutputStream os = new FileOutputStream(new File("C:/output.mp3", true)); int count; while ((count = in.read(buffer)) != -1) { os.write(buffer, 0, count); os.flush(); } in.close(); in = new FileInputStream("C:/b.mp3");// second mp3 while ((count = in.read(buffer)) != -1) {