See: Description
| Interface | Description | 
|---|---|
| LineHandler | 
 行处理器 
 | 
| StreamProgress | 
 Stream进度条 
提供流拷贝进度监测,如开始、结束触发,以及进度回调。  | 
| Class | Description | 
|---|---|
| AppendableWriter | 
 同时继承 
Writer和实现Appendable的聚合类,用于适配两种接口操作
 实现来自:jodd | 
| BOMInputStream | 
 读取带BOM头的流内容, 
getCharset()方法调用后会得到BOM头的编码,且会去除BOM头BOM定义:http://www.unicode.org/unicode/faq/utf_bom.html 00 00 FE FF = UTF-32, big-endian FF FE 00 00 = UTF-32, little-endian EF BB BF = UTF-8 FE FF = UTF-16, big-endian FF FE = UTF-16, little-endian 使用: 
 String enc = "UTF-8"; // or NULL to use systemdefault
 参考: http://akini.mbnet.fi/java/unicodereader/UnicodeInputStream.java.txt  | 
| BomReader | 
 读取带BOM头的流内容的Reader,如果非bom的流或无法识别的编码,则默认UTF-8 
BOM定义:http://www.unicode.org/unicode/faq/utf_bom.html 00 00 FE FF = UTF-32, big-endian FF FE 00 00 = UTF-32, little-endian EF BB BF = UTF-8 FE FF = UTF-16, big-endian FF FE = UTF-16, little-endian 使用: 
 FileInputStream fis = new FileInputStream(file);  | 
| BufferUtil | 
ByteBuffer 工具类此工具来自于 t-io 项目以及其它项目的相关部分收集 ByteBuffer的相关介绍见:https://www.cnblogs.com/ruber/p/6857159.html  | 
| CharsetDetector | 
 编码探测器 
 | 
| FastByteArrayOutputStream | 
 基于快速缓冲FastByteBuffer的OutputStream,随着数据的增长自动扩充缓冲区
 
 可以通过 
FastByteArrayOutputStream.toByteArray()和 FastByteArrayOutputStream.toString()来获取数据
 
 FastByteArrayOutputStream.close()方法无任何效果,当流被关闭后不会抛出IOException
 
 这种设计避免重新分配内存块而是分配新增的缓冲区,缓冲区不会被GC,数据也不会被拷贝到其他缓冲区。 | 
| FastByteBuffer | 
 代码移植自blade 
快速缓冲,将数据存放在缓冲集中,取代以往的单一数组  | 
| FastStringWriter | 
 借助 
StrBuilder 提供快读的字符串写出,相比jdk的StringWriter非线程安全,速度更快。 | 
| FileTypeUtil | 
 文件类型判断工具类
 此工具根据文件的前几位bytes猜测文件类型,对于文本、zip判断不准确,对于视频、图片类型判断准确
 需要注意的是,xlsx、docx等Office2007格式,全部识别为zip,因为新版采用了OpenXML格式,这些格式本质上是XML文件打包为zip 
 | 
| FileUtil | 
 文件工具类 
 | 
| IoUtil | 
 IO工具类 
IO工具类只是辅助流的读写,并不负责关闭流。  | 
| LimitedInputStream | 
 限制读取最大长度的 
FilterInputStream 实现来自:https://github.com/skylot/jadx/blob/master/jadx-plugins/jadx-plugins-api/src/main/java/jadx/api/plugins/utils/LimitedInputStream.java  | 
| ManifestUtil | 
 Jar包中manifest.mf文件获取和解析工具类
 来自Jodd 
 | 
| NioUtil | 
 NIO相关工具封装,主要针对Channel读写、拷贝等封装 
 | 
| NullOutputStream | 
 此OutputStream写出数据到/dev/null,即忽略所有数据 
来自 Apache Commons io  | 
| ValidateObjectInputStream | 
 带有类验证的对象流,用于避免反序列化漏洞 
详细见:https://xz.aliyun.com/t/41/  | 
| Enum | Description | 
|---|---|
| FileMagicNumber | 
 文件类型魔数封装 
 | 
| Exception | Description | 
|---|---|
| IORuntimeException | 
 IO运行时异常,常用于对IOException的包装 
 | 
Copyright © 2025. All rights reserved.