张延森 4 anni fa
parent
commit
88a14acff1
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6
    0
      src/main/java/com/yunzhi/niucai/alipay/Utils.java

+ 6
- 0
src/main/java/com/yunzhi/niucai/alipay/Utils.java Vedi File

@@ -7,6 +7,12 @@ import java.nio.charset.StandardCharsets;
7 7
 import java.nio.file.Paths;
8 8
 
9 9
 public class Utils {
10
+    /**
11
+     * 小文件读取, 文件大小不能超过 2M
12
+     * @param f
13
+     * @return
14
+     * @throws IOException
15
+     */
10 16
     public static String readFile(String f) throws IOException {
11 17
         FileChannel file = FileChannel.open(Paths.get(f));
12 18
         int fileSize = (int) file.size();