|
|
@ -22,7 +22,6 @@ import java.net.URISyntaxException;
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.regex.Matcher;
|
|
|
|
import java.util.regex.Matcher;
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
import java.util.regex.Pattern;
|
|
|
@ -33,17 +32,6 @@ public class CommonUtil {
|
|
|
|
|
|
|
|
|
|
|
|
public static String WebRoot;
|
|
|
|
public static String WebRoot;
|
|
|
|
|
|
|
|
|
|
|
|
public static byte[] convertFileToByteArray(File file) {
|
|
|
|
|
|
|
|
byte[] fileBytes = null;
|
|
|
|
|
|
|
|
try (FileInputStream fis = new FileInputStream(file)) {
|
|
|
|
|
|
|
|
fileBytes = new byte[(int) file.length()];
|
|
|
|
|
|
|
|
fis.read(fileBytes);
|
|
|
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return fileBytes;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取当前年份
|
|
|
|
//获取当前年份
|
|
|
|
public static String getCurrentYear() {
|
|
|
|
public static String getCurrentYear() {
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
|
|
|
|