日期:2014-05-18 浏览次数:20723 次
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();
}
}
}