mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
add method
This commit is contained in:
parent
644d1c22c7
commit
e04789c322
@ -3,7 +3,7 @@
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# 5.7.15 (2021-10-16)
|
||||
# 5.7.15 (2021-10-18)
|
||||
|
||||
### 🐣新特性
|
||||
* 【db 】 Db.quietSetAutoCommit增加判空(issue#I4D75B@Gitee)
|
||||
@ -11,6 +11,7 @@
|
||||
* 【core 】 Assert增加checkBetween重载(pr#436@Gitee)
|
||||
* 【core 】 ReUtil增加命名分组重载(pr#439@Gitee)
|
||||
* 【json 】 toString和writer增加Filter(issue#I4DQNQ@Gitee)
|
||||
* 【core 】 ContentType增加build重载(pr#1898@Github)
|
||||
*
|
||||
### 🐞Bug修复
|
||||
* 【core 】 修复CollUtil.isEqualList两个null返回错误问题(issue#1885@Github)
|
||||
|
@ -45,6 +45,7 @@ public enum ContentType {
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
* @param value ContentType值
|
||||
*/
|
||||
ContentType(String value) {
|
||||
@ -141,4 +142,16 @@ public enum ContentType {
|
||||
public static String build(String contentType, Charset charset) {
|
||||
return StrUtil.format("{};charset={}", contentType, charset.name());
|
||||
}
|
||||
|
||||
/**
|
||||
* 输出Content-Type字符串,附带编码信息
|
||||
*
|
||||
* @param contentType Content-Type 枚举类型
|
||||
* @param charset 编码
|
||||
* @return Content-Type字符串
|
||||
* @since 5.7.15
|
||||
*/
|
||||
public static String build(ContentType contentType, Charset charset) {
|
||||
return build(contentType.getValue(), charset);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user