public class Test {
public static void main(String[] args) {
try {
File file = new File("D:\\DMDownLoad\\Song\\陈翔-承诺.mp3");
FileInputStream in = new FileInputStream(file);
File fileRs = new File("D:\\DMDownLoad\\Song\\陈翔-承诺.wav");
FileOutputStream os = new FileOutputStream(fileRs);
int n = 0;// 每次读取的字节长度
byte[] bb = new byte[1024];// 存储每次读取的内容
while ((n = in.read(bb)) != -1) {
os.write(bb, 0, n);// 将读取的内容,写入到输出流当中
}
os.close();// 关闭输入输出流
in.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
public class Test {
public static void main(String[] args) {
try {
File file = new File("D:\\DMDownLoad\\Song\\陈翔-承诺.mp3");
FileInputStream in = new FileInputStream(file);
File fileRs = new File("D:\\DMDownLoad\\Song\\陈翔-承诺.wav");
FileOutputStream os = new FileOutputStream(fileRs);
int n = 0;// 每次读取的字节长度
byte[] bb = new byte[1024];// 存储每次读取的内容
while ((n = in.read(bb)) != -1) {
os.write(bb, 0, n);// 将读取的内容,写入到输出流当中
}
os.close();// 关闭输入输出流
in.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
public class Test {
public static void main(String[] args) {
try {
File file = new File("D:\\DMDownLoad\\Song\\陈翔-承诺.mp3");
FileInputStream in = new FileInputStream(file);
File fileRs = new File("D:\\DMDownLoad\\Song\\陈翔-承诺.wav");
FileOutputStream os = new FileOutputStream(fileRs);
int n = 0;// 每次读取的字节长度
byte[] bb = new byte[1024];// 存储每次读取的内容
while ((n = in.read(bb)) != -1) {
os.write(bb, 0, n);// 将读取的内容,写入到输出流当中
}
os.close();// 关闭输入输出流
in.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
以上方法可行没问题啊?是我理解错了你的要求了么
#9
要是说的你怎么简单 我早就试过了
唉,懒人不能当啊,好吧好吧,你说不行,我就去试了下:
public class Test {
public static void main(String[] args) {
try {
File file = new File("D:\\DMDownLoad\\Song\\陈翔-承诺.mp3");
FileInputStream in = new FileInputStream(file);
File fileRs = new File("D:\\DMDownLoad\\Song\\陈翔-承诺.wav");
FileOutputStream os = new FileOutputStream(fileRs);
int n = 0;// 每次读取的字节长度
byte[] bb = new byte[1024];// 存储每次读取的内容
while ((n = in.read(bb)) != -1) {
os.write(bb, 0, n);// 将读取的内容,写入到输出流当中
}
os.close();// 关闭输入输出流
in.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
public class Test {
public static void main(String[] args) {
try {
File file = new File("D:\\DMDownLoad\\Song\\陈翔-承诺.mp3");
FileInputStream in = new FileInputStream(file);
File fileRs = new File("D:\\DMDownLoad\\Song\\陈翔-承诺.wav");
FileOutputStream os = new FileOutputStream(fileRs);
int n = 0;// 每次读取的字节长度
byte[] bb = new byte[1024];// 存储每次读取的内容
while ((n = in.read(bb)) != -1) {
os.write(bb, 0, n);// 将读取的内容,写入到输出流当中
}
os.close();// 关闭输入输出流
in.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}