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