张延森 4 年前
父节点
当前提交
88a14acff1
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6
    0
      src/main/java/com/yunzhi/niucai/alipay/Utils.java

+ 6
- 0
src/main/java/com/yunzhi/niucai/alipay/Utils.java 查看文件

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