replace with list

replace with list
pull/166/head
xufulong 5 years ago
parent 3d513e1c6a
commit a6c5459d8d
  1. 7
      app/src/main/java/com/frank/ffmpeg/util/FileUtil.java

@ -7,6 +7,7 @@ import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.util.List;
/** /**
* file tool * file tool
@ -160,8 +161,8 @@ public class FileUtil {
return filePath.substring(filePath.lastIndexOf("/") + 1); return filePath.substring(filePath.lastIndexOf("/") + 1);
} }
public static String createListFile(String listPath, String[] fileArray) { public static String createListFile(String listPath, List<String> fileList) {
if ((TextUtils.isEmpty(listPath) || fileArray == null || fileArray.length == 0)) { if ((TextUtils.isEmpty(listPath) || fileList == null || fileList.size() == 0)) {
return null; return null;
} }
FileOutputStream outputStream = null; FileOutputStream outputStream = null;
@ -179,7 +180,7 @@ public class FileUtil {
} }
outputStream = new FileOutputStream(listFile); outputStream = new FileOutputStream(listFile);
StringBuilder fileBuilder = new StringBuilder(); StringBuilder fileBuilder = new StringBuilder();
for (String file : fileArray) { for (String file : fileList) {
fileBuilder fileBuilder
.append("file") .append("file")
.append(" ") .append(" ")

Loading…
Cancel
Save