1.这里直接输入|会失效
private static String isFormatSuffix(String fileAllName, String suffixs) {
String[] split = suffixs.split("\\|");//直接输入|会失效
for (int i = 0; i < split.length; i++) {
if (fileAllName.endsWith(split[i])) {
return split[i];
}
}
throw new RuntimeException("请选择正确的文件格式,如:" + suffixs);
}