类 IoUtils
java.lang.Object
cn.ezeyc.edpenc.util.IoUtils
- 作者:
- wz
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static void关闭流static longcrc32(byte[] bytes) 计算cecstatic void删除整个目录static void枚举所有文件,包括文件夹static void递归查找文件,只返回文件static byte[]merger(byte[]... bts) 合并byte[]static byte[]readFileToByte(File file) 读取文件static StringreadTxtFile(File file) 读取文本文件static byte[]toBytes(InputStream input) stream2byte[]static void写文件static voidwriteTxtFile(File file, String txt) 写文件
-
构造器详细资料
-
IoUtils
public IoUtils()
-
-
方法详细资料
-
writeFile
写文件- 参数:
file- 文件fileBytes- 字节
-
readFileToByte
读取文件- 参数:
file- 文件- 返回:
- 字节
-
toBytes
stream2byte[]- 参数:
input- 输入流- 返回:
- 字节
- 抛出:
IOException- IOException
-
listFile
递归查找文件,只返回文件- 参数:
fileList- 返回的文件列表dir- 目录endWith- 文件后缀
-
listFile
枚举所有文件,包括文件夹- 参数:
filess- 返回的文件列表dir- 目录
-
delete
删除整个目录- 参数:
dir- 目录
-
crc32
public static long crc32(byte[] bytes) 计算cec- 参数:
bytes- 字节- 返回:
- crc值
-
close
关闭流- 参数:
outs- Closeable
-
readTxtFile
读取文本文件- 参数:
file- 文件- 返回:
- 内容
-
writeTxtFile
写文件- 参数:
file- 文件txt- 内容
-
merger
public static byte[] merger(byte[]... bts) 合并byte[]- 参数:
bts- 字节数组- 返回:
- 合并后的字节
-