Package com.wechat.pay.java.core.util
Class IOUtil
java.lang.Object
com.wechat.pay.java.core.util.IOUtil
I/O工具
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringloadStringFromPath(String path) 从文件路径中读取字符串static byte[]toByteArray(InputStream inputStream) 转换输入流为字节数组static StringtoString(InputStream inputStream) 转换输入流为字符串
-
Method Details
-
toByteArray
转换输入流为字节数组- Parameters:
inputStream- 输入流- Returns:
- 字节数组
- Throws:
IOException- 读取字节失败、关闭流失败等
-
toString
转换输入流为字符串- Parameters:
inputStream- 输入流- Returns:
- UTF-8编码的字符串
- Throws:
IOException- 读取字节失败、关闭流失败等
-
loadStringFromPath
从文件路径中读取字符串- Parameters:
path- 文件路径- Returns:
- UTF-8编码的字符串
- Throws:
IOException- 读取字节失败、关闭流失败等
-