mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
add method
This commit is contained in:
parent
b73728f956
commit
90038e878f
@ -2,7 +2,7 @@
|
||||
# 🚀Changelog
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
# 5.7.22 (2022-02-27)
|
||||
# 5.7.22 (2022-03-01)
|
||||
|
||||
### 🐣新特性
|
||||
* 【poi 】 ExcelUtil.readBySax增加对POI-5.2.0的兼容性(issue#I4TJF4@gitee)
|
||||
@ -18,6 +18,7 @@
|
||||
* 【core 】 增加AntPathMatcher(issue#I4T7K5@Gitee)
|
||||
* 【core 】 StrJoiner修改toString策略,调用不再修改Appendable
|
||||
* 【core 】 StrJoiner增加length和merge方法
|
||||
* 【core 】 CRC16增加getHexValue方法(issue#I4VO3U@Gitee)
|
||||
|
||||
### 🐞Bug修复
|
||||
* 【cache 】 修复ReentrantCache.toString方法线程不安全问题(issue#2140@Github)
|
||||
|
@ -17,7 +17,7 @@ public class CRC16 implements Checksum, Serializable {
|
||||
|
||||
private final CRC16Checksum crc16;
|
||||
|
||||
public CRC16(){
|
||||
public CRC16() {
|
||||
this(new CRC16IBM());
|
||||
}
|
||||
|
||||
@ -26,10 +26,31 @@ public class CRC16 implements Checksum, Serializable {
|
||||
*
|
||||
* @param crc16Checksum {@link CRC16Checksum} 实现
|
||||
*/
|
||||
public CRC16(CRC16Checksum crc16Checksum){
|
||||
public CRC16(CRC16Checksum crc16Checksum) {
|
||||
this.crc16 = crc16Checksum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取16进制的CRC16值
|
||||
*
|
||||
* @return 16进制的CRC16值
|
||||
* @since 5.7.22
|
||||
*/
|
||||
public String getHexValue() {
|
||||
return this.crc16.getHexValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取16进制的CRC16值
|
||||
*
|
||||
* @param isPadding 不足4位时,是否填充0以满足位数
|
||||
* @return 16进制的CRC16值,4位
|
||||
* @since 5.7.22
|
||||
*/
|
||||
public String getHexValue(boolean isPadding) {
|
||||
return crc16.getHexValue(isPadding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getValue() {
|
||||
return crc16.getValue();
|
||||
|
@ -377,4 +377,9 @@ public class Column implements Serializable, Cloneable {
|
||||
public String toString() {
|
||||
return "Column [tableName=" + tableName + ", name=" + name + ", type=" + type + ", size=" + size + ", isNullable=" + isNullable + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Column clone() throws CloneNotSupportedException {
|
||||
return (Column) super.clone();
|
||||
}
|
||||
}
|
||||
|
@ -252,7 +252,7 @@ public class JSONUtil {
|
||||
return XML.toJSONObject(xmlStr);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------- Pause end
|
||||
// -------------------------------------------------------------------- Parse end
|
||||
|
||||
// -------------------------------------------------------------------- Read start
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user