Commit bcb815b0 authored by 周亚武's avatar 周亚武

修改合并mp3文件规则

parent c0467aa3
...@@ -20,8 +20,11 @@ public class SpliceMp3Util { ...@@ -20,8 +20,11 @@ public class SpliceMp3Util {
* *
*/ */
public static String fenLiData(String path,String lujing) throws IOException { public static String fenLiData(String path,String lujing) throws IOException {
File file = ResourcesUtil.getFile(SpliceMp3Util.class,path); ClassPathResource resource = new ClassPathResource(path);
InputStream inputStream = resource.getInputStream();
String fileName = path.substring(path.lastIndexOf("/")+1); String fileName = path.substring(path.lastIndexOf("/")+1);
File file = new File(lujing+fileName);
saveToFile(inputStream,file);
File file1 = new File(lujing+fileName + "01");// 分离ID3V2后的文件,这是个中间文件,最后要被删除 File file1 = new File(lujing+fileName + "01");// 分离ID3V2后的文件,这是个中间文件,最后要被删除
File file2 = new File(lujing+fileName + "001");// 分离id3v1后的文件 File file2 = new File(lujing+fileName + "001");// 分离id3v1后的文件
RandomAccessFile rf = new RandomAccessFile(file, "rw");// 随即读取文件 RandomAccessFile rf = new RandomAccessFile(file, "rw");// 随即读取文件
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment