## File: README.md

-------------------------------------------------------------------------------

[**🌎English Documentation**](README-EN.md)

-------------------------------------------------------------------------------

## 📚简介

`Hutool`是一个功能丰富且易用的**Java工具库**，通过诸多实用工具类的使用，旨在帮助开发者快速、便捷地完成各类开发任务。
这些封装的工具涵盖了字符串、数字、集合、编码、日期、文件、IO、加密、数据库JDBC、JSON、HTTP客户端等一系列操作，
可以满足各种不同的开发需求。

### 🎁Hutool名称的由来

Hutool = Hu + tool，是原公司项目底层代码剥离后的开源库，“Hu”是公司名称的表示，tool表示工具。Hutool谐音“糊涂”，一方面简洁易懂，一方面寓意“难得糊涂”。

### 🍺Hutool理念

`Hutool`既是一个工具集，也是一个知识库，我们从不自诩代码原创，大多数工具类都是**搬运**而来，因此：

- 你可以引入使用，也可以**拷贝**和修改使用，而**不必标注任何信息**，只是希望能把bug及时反馈回来。
- 我们努力健全**中文**注释，为源码学习者提供良好地学习环境，争取做到人人都能看得懂。

-------------------------------------------------------------------------------

## 🛠️包含组件
一个Java基础工具类，对文件、流、加密解密、转码、正则、线程、XML等JDK方法进行封装，组成各种Util工具类，同时提供以下组件：

| 模块                 |     介绍                                                                          |
|--------------------|---------------------------------------------------------------------------------- |
| hutool-aop         |     JDK动态代理封装，提供非IOC下的切面支持                                              |
| hutool-bloomFilter |     布隆过滤，提供一些Hash算法的布隆过滤                                                |
| hutool-cache       |     简单缓存实现                                                                     |
| hutool-core        |     核心，包括Bean操作、日期、各种Util等                                               |
| hutool-cron        |     定时任务模块，提供类Crontab表达式的定时任务                                          |
| hutool-crypto      |     加密解密模块，提供对称、非对称和摘要算法封装                                          |
| hutool-db          |     JDBC封装后的数据操作，基于ActiveRecord思想                                         |
| hutool-dfa         |     基于DFA模型的多关键字查找                                                         |
| hutool-extra       |     扩展模块，对第三方封装（模板引擎、邮件、Servlet、二维码、Emoji、FTP、分词等）            |
| hutool-http        |     基于HttpUrlConnection的Http客户端封装                                            |
| hutool-log         |     自动识别日志实现的日志门面                                                         |
| hutool-script      |     脚本执行封装，例如Javascript                                                      |
| hutool-setting     |     功能更强大的Setting配置文件和Properties封装                                        |
| hutool-system      |     系统参数调用封装（JVM信息等）                                                      |
| hutool-json        |     JSON实现                                                                       |
| hutool-captcha     |     图片验证码实现                                                                   |
| hutool-poi         |     针对POI中Excel和Word的封装                                                       |
| hutool-socket      |     基于Java的NIO和AIO的Socket封装                                                   |
| hutool-jwt         |     JSON Web Token (JWT)封装实现                                                    |
| hutool-ai          |     AI大模型封装实现                                                    |

可以根据需求对每个模块单独引入，也可以通过引入`hutool-all`方式引入所有模块。

-------------------------------------------------------------------------------

## 📝文档 

[📘中文文档](https://doc.hutool.cn/pages/index/)

[📘中文备用文档](https://plus.hutool.cn/)

[📙参考API](https://plus.hutool.cn/apidocs/)

[🎬视频介绍](https://www.bilibili.com/video/BV1bQ4y1M7d9?p=2)

-------------------------------------------------------------------------------



## 📦安装

### 🍊Maven
在项目的pom.xml的dependencies中加入以下内容:

```xml
<dependency>
    <groupId>cn.hutool</groupId>
    <artifactId>hutool-all</artifactId>
    <version>5.8.47</version>
</dependency>
```

### 🍐Gradle
```
implementation 'cn.hutool:hutool-all:5.8.47'
```

### 📥下载jar

点击以下链接，下载`hutool-all-X.X.X.jar`即可：

- [Maven中央库](https://repo1.maven.org/maven2/cn/hutool/hutool-all/5.8.47/)

> 🔔️注意
> Hutool 5.x支持JDK8+，对Android平台没有测试，不能保证所有工具类或工具方法可用。
> 如果你的项目使用JDK7，请使用Hutool 4.x版本（不再更新）

### 🚽编译安装

访问Hutool的Gitee主页：[https://gitee.com/chinabugotech/hutool](https://gitee.com/chinabugotech/hutool) 下载整个项目源码（v5-master或v5-dev分支都可）然后进入Hutool项目目录执行：

```sh
./hutool.sh install
```

然后就可以使用Maven引入了。

-------------------------------------------------------------------------------

## 🏗️添砖加瓦

### 🎋分支说明

Hutool的源码分为两个分支，功能如下：

| 分支       | 作用                                                          |
|-----------|---------------------------------------------------------------|
| v5-master | 主分支，release版本使用的分支，与中央库提交的jar一致，不接收任何pr或修改 |
| v5-dev    | 开发分支，默认为下个版本的SNAPSHOT版本，接受修改或pr                 |

### 🐞提供bug反馈或建议

提交问题反馈请说明正在使用的JDK版本呢、Hutool版本和相关依赖库版本。

- [Gitee issue](https://gitee.com/chinabugotech/hutool/issues)
- [Github issue](https://github.com/chinabugotech/hutool/issues)
- [Gitcode issue](https://gitcode.com/chinabugotech/hutool/issues)


### 🧬贡献代码的步骤

1. 在Gitee或者Github/Gitcode上fork项目到自己的repo
2. 把fork过去的项目也就是你的项目clone到你的本地
3. 修改代码（记得一定要修改v5-dev分支）
4. commit后push到自己的库（v5-dev分支）
5. 登录Gitee或Github/Gitcode在你首页可以看到一个 pull request 按钮，点击它，填写一些说明信息，然后提交即可。
6. 等待维护者合并

### 📐PR遵照的原则

Hutool欢迎任何人为Hutool添砖加瓦，贡献代码，不过维护者是一个强迫症患者，为了照顾病人，需要提交的pr（pull request）符合一些规范，规范如下：

1. 注释完备，尤其每个新增的方法应按照Java文档规范标明方法说明、参数说明、返回值说明等信息，必要时请添加单元测试，如果愿意，也可以加上你的大名。
2. Hutool的缩进按照Eclipse（~~不要跟我说IDEA多好用，维护者非常懒，学不会~~，IDEA真香，改了Eclipse快捷键后舒服多了）默认（tab）缩进，所以请遵守（不要和我争执空格与tab的问题，这是一个病人的习惯）。
3. 新加的方法不要使用第三方库的方法，Hutool遵循无依赖原则（除非在extra模块中加方法工具）。
4. 请pull request到`v5-dev`分支。Hutool在5.x版本后使用了新的分支：`v5-master`是主分支，表示已经发布中央库的版本，这个分支不允许pr，也不允许修改。
5. 我们如果关闭了你的issue或pr，请不要诧异，这是我们保持问题处理整洁的一种方式，你依旧可以继续讨论，当有讨论结果时我们会重新打开。

### 📖文档源码地址

[文档源码地址](https://gitee.com/loolly_admin/hutool-doc-handy) 点击前往添砖加瓦

-------------------------------------------------------------------------------

## ⭐Star Hutool

[](https://starchart.cc/chinabugotech/hutool)

---

## File: hutool-core/README.md

## 📚Hutool-core 模块介绍

`Hutool-core`提供了最常使用的基础工具类，包括集合、Map、IO、线程、Bean、图片处理、线程并发等便捷工具。

-------------------------------------------------------------------------------

## 🛠️包含内容

### 注解(annotation)

提供了注解工具类，以及一些注解封装。如`CombinationAnnotationElement`组合注解以及Alias别名注解等。

### bean(bean)

提供了Bean工具类，以及Bean属性解析、Bean拷贝、动态Bean等。

### 构建器(builder)

抽象了Builder接口，提供建造者模式的封装，并默认提供了包括equals封装、Bean构建封装、比较器封装等。

### 克隆(clone)

提供`Cloneable`接口，明确`clone`方法，并提供默认实现类。

### 编码(codec)

提供了BaseN编码（Base16、Base32、Base58、Base62、Base64）编码实现。并提供了包括BCD、PunyCode、百分号编码的实现。
同时提供了包括莫尔斯电码、凯撒密码、RotN这类有趣功能的实现。

### 集合(collection)

集合中主要是提供了针对`Iterator`实现类的工具封装方法`IterUtil`和集合类封装的工具类`CollUtil`，并提供了一些特别的集合封装。

### 比较器(comparator)

主要是一些比较器的实现，如Bean字段比较器、自定义函数比较器、版本比较器等。

### 动态编译(compiler)

提供`javax.tools.JavaCompiler`的包装简化服务，形成源码动态编译工具类`CompilerUtil`，完成代码动态编译及热部署。

### 压缩(compress)

主要针对`java.util.zip`中的相关类封装工具，提供Zip、Gzip、Zlib等格式的压缩解压缩封装，为`ZipUtil`提供服务。

### 转换(convert)

“万能”转换器，提供整套的类型转换方式。通过`Converter`接口和`ConverterRegistry`转换登记中心，完成任意数据类型转换和自定义转换。

### 日期时间(date)

提供`Date`、`Calendar`、`java.time`相关API的工具化封装。包括时间解析、格式化、偏移等。

### 异常(exceptions)

提供异常工具`ExceptionUtil`，以及一些工具内部使用的异常。

### getter接口(getter)

提供各种类型的get操作接口封装。

### 图片(img)

提供图片、绘图、字体等工具封装，并提供GIF生成器和解析器实现。

### IO流和文件(io)

提供IO流工具、文件工具、文件类型工具等，并提供流拷贝、Checksum、文件监听功能实现。

### 语言特性(lang)

超级大杂项，提供一些设计模式的抽象实现（如单例模式`Singleton`），还有正则、Id生成器、函数、Hash算法、可变对象、树形结构、字典等。

### Map(map)

提供Map工具类和各类Map实现封装，如行列键的Table实现、自定义键值对转换的Map、线程安全的WeakMap实现等。

### 数学(math)

提供简单数学计算封装，如排列组合、货币类等。

### 网络(net)

提供网络相关工具封装，以及Ip地址工具类、SSL工具类、URL编码解码等。

### StreamAPI封装(stream)

提供简单的Stream相关封装。

### Swing和AWT(swing)

提供桌面应用API的工具封装，如启动应用、控制键盘鼠标操作、截屏等功能。

### 文本字符串(text)

提供强大的字符串文本封装，包括字符转换、字符串查找、字符串替换、字符串切分、Unicode工具等，并提供CSV格式封装。

### 线程及并发(thread)

线程并发封装，包括线程工具、锁工具、`CompletableFuture`封装工具、线程池构建等。

### 工具杂项(util)

提供其他不便归类的杂项工具类。如数组、编码、字符、Class、坐标系、身份证、组织机构代码、脱敏、枚举、转义、XML、进制转换、随机数、反射、正则、SPI等各种工具。

---

## File: README-EN.md

-------------------------------------------------------------------------------

[**🌎中文说明**](README.md)

-------------------------------------------------------------------------------

## 📚Introduction
**Hutool** is a small but comprehensive library of Java tools, achieved by encapsulation through static methods, reduce the cost of learning related APIs, increase productivity, and make Java as elegant as a functional programming language,let the Java be "sweet" too.

**Hutool** tools and methods from each user's crafted, it covers all aspects of the underlying code of Java development, it is a powerful tool for large project development to solve small problems, but also the efficiency of small projects;

**Hutool** is a project "util" package friendly alternative, it saves developers on the project of common classes and common tool methods of encapsulation time, so that development focus on business, at the same time can minimize the encapsulation is not perfect to avoid the bugs.

### 🎁Origin of the 'Hutool' name

**Hutool = Hu + tool**，Is the original company project after the stripping of the underlying code of the open source library , "Hu" is the short name of the company , 'tool' that tool .

Hutool,' Hútú '(Chinese Pinyin)，On the one hand, it is simple and easy to understand, on the other hand, it means "hard to be confused".(note: confused means 'Hútú (糊涂)' in china )

### 🍺How Hutool is changing the way we code

The goal of  **Hutool**  is to use a simple function instead of a complex piece of code, thus avoiding the problem of "copy and paste" code as much as possible and revolutionizing the way we write code.

To calculate MD5 for example:

- 👴【Before】Open a search engine -> search "Java MD5 encryption" -> open a blog -> copy and paste -> change it to work.
- 👦【Now   】import Hutool -> SecureUtil.md5()

Hutool exists to reduce code search costs and avoid bugs caused by imperfect code on the web.

### Thanks
> this README is PR by [chengxian-yi](https://gitee.com/yichengxian)
-------------------------------------------------------------------------------

## 🛠️Module
A Java-based tool class for files, streams, encryption and decryption, transcoding, regular, thread, XML and other JDK methods for encapsulation，composing various Util tool classes, as well as providing the following modules：

| module             |     description                                                                                                            |
|--------------------|-------------------------------------------------------------------------------------------------------------------------|
| hutool-aop         |     JDK dynamic proxy encapsulation to provide non-IOC faceting support                                                 |
| hutool-bloomFilter |     Bloom filtering to provide some Hash algorithm Bloom filtering                                                      |
| hutool-cache       |     Simple cache                                                                                                        |
| hutool-core        |     Core, including Bean operations, dates, various Utils, etc.                                                         |
| hutool-cron        |     Task scheduling with Cron expressions                                                                               |
| hutool-crypto      |     Provides symmetric, asymmetric and digest algorithm encapsulation                                                   |
| hutool-db          |     Db operations based on ActiveRecord thinking.                                                                       |
| hutool-dfa         |     DFA models, such as multi-keyword lookups                                                                           |
| hutool-extra       |     Extension modules, third-party wrappers (template engine, mail, servlet, QR code, Emoji, FTP, word splitting, etc.) |
| hutool-http        |     Http client                                                                                                         |
| hutool-log         |     Log (facade)                                                                                                        |
| hutool-script      |     Script execution encapsulation, e.g. Javascript                                                                     |
| hutool-setting     |     Stronger Setting Profile tools and Properties tools                                                                 |
| hutool-system      |     System parameter tools (JVM information, etc.)                                                                      |
| hutool-json        |     JSON                                                                                                                |
| hutool-captcha     |     Image Captcha                                                                                                       |
| hutool-poi         |     Tools for working with Excel and Word in POI                                                                        |
| hutool-socket      |     Java-based tool classes for NIO and AIO sockets                                                                     |
| hutool-jwt         |     JSON Web Token (JWT) implement                                                                                      |
| hutool-ai          |     AI implement                                                                                      |

Each module can be introduced individually, or all modules can be introduced by introducing `hutool-all` as required.

-------------------------------------------------------------------------------

## 📝Doc

[📘Chinese documentation](https://doc.hutool.cn/pages/index/)

[📘Chinese back-up documentation](https://plus.hutool.cn/)

[📙API](https://plus.hutool.cn/apidocs/)

[🎬Video](https://www.bilibili.com/video/BV1bQ4y1M7d9?p=2)

-------------------------------------------------------------------------------



## 📦Install

### 🍊Maven
```xml
<dependency>
    <groupId>cn.hutool</groupId>
    <artifactId>hutool-all</artifactId>
    <version>5.8.47</version>
</dependency>
```

### 🍐Gradle
```
implementation 'cn.hutool:hutool-all:5.8.47'
```

## 📥Download

- [Maven Repo](https://repo1.maven.org/maven2/cn/hutool/hutool-all/5.8.47/)

> 🔔️note:
> Hutool 5.x supports JDK8+ and is not tested on Android platforms, and cannot guarantee that all tool classes or tool methods are available.
> If your project uses JDK7, please use Hutool 4.x version.

### 🚽Compile and install

Download the entire project source code

gitee：[https://gitee.com/chinabugotech/hutool](https://gitee.com/chinabugotech/hutool) 

github:[https://github.com/chinabugotech/hutool](https://github.com/chinabugotech/hutool)

```sh
cd ${hutool}
./hutool.sh install
```

-------------------------------------------------------------------------------

## 🏗️Other

### 🎋Branch Description

Hutool's source code is divided into two branches:

| branch | description                                               |
|-----------|---------------------------------------------------------------|
| v5-master | The master branch, the branch used by the release version, is the same as the jar committed to the central repository and does not receive any pr or modifications. |
| v5-dev    | Development branch, which defaults to the next SNAPSHOT version, accepts modifications or pr |

### 🐞Provide feedback or suggestions on bugs

When submitting feedback, please indicate which JDK version, Hutool version, and related dependency library version you are using.

- [Gitee issue](https://gitee.com/chinabugotech/hutool/issues)
- [Github issue](https://github.com/chinabugotech/hutool/issues)
- [Gitcode issue](https://gitcode.com/chinabugotech/hutool/issues)

### 🧬Principles of PR(pull request)

Hutool welcomes anyone to contribute code to Hutool, but the author suffers from OCD and needs to submit a pr (pull request) that meets some specifications in order to care for the patient.：

1. Improve the comments, especially each new method should follow the Java documentation specification to indicate the method description, parameter description, return value description and other information, if necessary, please add unit tests, if you want, you can also add your name.
2. Code indentation according to Eclipse.
3. Newly added methods do not use third-party library methods，Unless the method tool is add to the '**extra module**'.
4. Please pull request to the `v5-dev` branch. Hutool uses a new branch after 5.x: `v5-master` is the master branch, which indicates the version of the central library that has been released, and this branch does not allow pr or modifications.

### 📖 Documentation source code

[Documentation source code](https://gitee.com/loolly_admin/hutool-doc-handy)

-------------------------------------------------------------------------------

## ⭐Star Hutool

[](https://starchart.cc/chinabugotech/hutool)