Package | Description |
---|---|
org.dromara.hutool.core.classloader |
类加载相关封装和工具
|
org.dromara.hutool.core.compress |
压缩解压封装
|
org.dromara.hutool.core.io.file |
对文件读写的封装,包括文件拷贝、文件读取、文件写出、行处理等
|
org.dromara.hutool.core.io.resource |
针对ClassPath和文件中资源读取的封装,主要入口为工具类ResourceUtil
|
org.dromara.hutool.http.client.body |
请求体封装实现
|
org.dromara.hutool.json.serializer.impl |
默认实现的序列化和反序列化
|
org.dromara.hutool.setting |
Setting模块主要针对Properties文件读写做封装,同时定义一套自己的配置文件规范,实现兼容性良好的配置工具。
|
org.dromara.hutool.setting.props |
配置文件实现封装,例如Properties封装Props
|
org.dromara.hutool.setting.toml |
TOML(Tom's Obvious, Minimal Language)配置文件解析和生成
规范:https://toml.io/cn/
参考实现:https://github.com/TheElectronWill/TOML-javalib
|
org.dromara.hutool.swing.img |
图像处理相关工具类封装
|
Modifier and Type | Class and Description |
---|---|
class |
ResourceClassLoader<T extends Resource>
资源类加载器,可以加载任意类型的资源类
|
Modifier and Type | Method and Description |
---|---|
ZipWriter |
ZipWriter.add(Resource... resources)
添加资源到压缩包,添加后关闭资源流
|
ZipReplacer |
ZipReplacer.addReplace(String entryPath,
Resource resource)
增加替换的内容,如果路径不匹配,则不做替换,也不加入
|
static File |
ZipUtil.zip(File zipFile,
Charset charset,
Resource... resources)
对流中的数据加入到压缩文件
路径列表和流列表长度必须一致 |
Modifier and Type | Method and Description |
---|---|
static File |
FileUtil.copy(Resource src,
File target,
boolean isOverride)
拷贝资源到目标文件
如果src为
FileResource ,调用文件拷贝。 |
static Path |
PathUtil.copy(Resource src,
Path target,
CopyOption... options)
拷贝资源到目标文件
如果src为
FileResource ,调用文件拷贝。 |
Modifier and Type | Class and Description |
---|---|
class |
BytesResource
基于byte[]的资源获取器
注意:此对象中getUrl方法始终返回null |
class |
CharSequenceResource
CharSequence 资源,字符串做为资源 |
class |
ClassPathResource
ClassPath单一资源访问类
传入路径path必须为相对路径,如果传入绝对路径,Linux路径会去掉开头的“/”,而Windows路径会直接报错。 |
class |
FileObjectResource
FileObject 资源包装 |
class |
FileResource
|
class |
HttpResource
HTTP资源,用于自定义表单数据,可自定义Content-Type
|
class |
InputStreamResource
基于
InputStream 的资源获取器注意:此对象中getUrl方法始终返回null |
class |
JarResource
Jar包资源对象
|
class |
MultiFileResource
|
class |
MultiResource
|
class |
StringResource
字符串资源,字符串做为资源
|
class |
UrlResource
URL资源访问类
|
class |
VfsResource
VFS资源封装
支持VFS 3.x on JBoss AS 6+,JBoss AS 7 and WildFly 8+ 参考:org.springframework.core.io.VfsUtils |
class |
WebAppResource
Web root资源访问对象
|
Modifier and Type | Method and Description |
---|---|
static Resource |
ResourceUtil.getResource(File file)
获取
FileResource 资源对象 |
static Resource |
ResourceUtil.getResource(String path)
|
static Resource |
ResourceUtil.getResource(URL url)
获取
UrlResource 资源对象 |
Resource |
MultiResource.next() |
Modifier and Type | Method and Description |
---|---|
Iterator<Resource> |
MultiResource.iterator() |
Modifier and Type | Method and Description |
---|---|
MultiResource |
MultiResource.add(Resource resource)
增加资源
|
MultiFileResource |
MultiFileResource.add(Resource resource) |
static void |
ResourceUtil.loadTo(Properties properties,
Resource resource,
Charset charset)
|
Modifier and Type | Method and Description |
---|---|
MultiResource |
MultiResource.addAll(Iterable<? extends Resource> iterable)
增加多个资源
|
Constructor and Description |
---|
HttpResource(Resource resource,
String contentType)
构造
|
MultiResource(Resource... resources)
构造
|
Constructor and Description |
---|
MultiResource(Collection<Resource> resources)
构造
|
Modifier and Type | Method and Description |
---|---|
Resource |
ResourceBody.getResource()
获取资源
|
Modifier and Type | Method and Description |
---|---|
JSON |
ResourceSerializer.serialize(Resource bean,
JSONContext context) |
Modifier and Type | Field and Description |
---|---|
protected Resource |
Setting.resource
设定文件的资源
|
Modifier and Type | Method and Description |
---|---|
GroupedMap |
SettingLoader.load(Resource resource)
加载设置文件
|
Constructor and Description |
---|
Setting(Resource resource,
Charset charset,
boolean isUseVariable)
构造
|
Setting(Resource resource,
SettingLoader loader)
构造
|
Modifier and Type | Method and Description |
---|---|
void |
Props.load(Resource resource)
初始化配置文件
|
Constructor and Description |
---|
Props(Resource resource,
Charset charset)
构造,使用URL读取
|
Modifier and Type | Method and Description |
---|---|
static Map<String,Object> |
Toml.read(Resource resource)
读取TOML
|
Modifier and Type | Method and Description |
---|---|
static Img |
Img.from(Resource resource)
从资源对象中读取图片并开始处理
|
static BufferedImage |
ImgUtil.read(Resource resource)
从
Resource 中读取图片 |
Copyright © 2025. All rights reserved.