public class MergeMp3 {
public static void main(String[] args) throws Exception {
FileInputStream fis = new FileInputStream("D:\\WorkSpace\\tmp\\a.mp3");
FileOutputStream fos = new FileOutputStream("D:\\WorkSpace\\tmp\\b.mp3", true);
byte b[] = new byte[1024 * 1024];
int len = 0;
while ((len = fis.read(b)) != -1) {
for (int i = 0; i < len; i++) {
System.out.println(b[i]);
fos.flush();
fos.write(b[i]);
System.out.println("合并成功!");
}
public class MergeMp3 {
public static void main(String[] args) throws Exception {
FileInputStream fis = new FileInputStream("D:\\WorkSpace\\tmp\\a.mp3");
FileOutputStream fos = new FileOutputStream("D:\\WorkSpace\\tmp\\b.mp3", true);
byte b[] = new byte[1024 * 1024];
int len = 0;
while ((len = fis.read(b)) != -1) {
for (int i = 0; i < len; i++) {
System.out.println(b[i]);
fos.flush();
fos.write(b[i]);
System.out.println("合并成功!");
}