add method

This commit is contained in:
Looly 2022-03-01 12:50:22 +08:00
parent b73728f956
commit 90038e878f
4 changed files with 31 additions and 4 deletions

View File

@ -2,7 +2,7 @@
# 🚀Changelog # 🚀Changelog
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
# 5.7.22 (2022-02-27) # 5.7.22 (2022-03-01)
### 🐣新特性 ### 🐣新特性
* 【poi 】 ExcelUtil.readBySax增加对POI-5.2.0的兼容性issue#I4TJF4@gitee * 【poi 】 ExcelUtil.readBySax增加对POI-5.2.0的兼容性issue#I4TJF4@gitee
@ -18,6 +18,7 @@
* 【core 】 增加AntPathMatcherissue#I4T7K5@Gitee * 【core 】 增加AntPathMatcherissue#I4T7K5@Gitee
* 【core 】 StrJoiner修改toString策略调用不再修改Appendable * 【core 】 StrJoiner修改toString策略调用不再修改Appendable
* 【core 】 StrJoiner增加length和merge方法 * 【core 】 StrJoiner增加length和merge方法
* 【core 】 CRC16增加getHexValue方法issue#I4VO3U@Gitee
### 🐞Bug修复 ### 🐞Bug修复
* 【cache 】 修复ReentrantCache.toString方法线程不安全问题issue#2140@Github * 【cache 】 修复ReentrantCache.toString方法线程不安全问题issue#2140@Github

View File

@ -17,7 +17,7 @@ public class CRC16 implements Checksum, Serializable {
private final CRC16Checksum crc16; private final CRC16Checksum crc16;
public CRC16(){ public CRC16() {
this(new CRC16IBM()); this(new CRC16IBM());
} }
@ -26,10 +26,31 @@ public class CRC16 implements Checksum, Serializable {
* *
* @param crc16Checksum {@link CRC16Checksum} 实现 * @param crc16Checksum {@link CRC16Checksum} 实现
*/ */
public CRC16(CRC16Checksum crc16Checksum){ public CRC16(CRC16Checksum crc16Checksum) {
this.crc16 = 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 @Override
public long getValue() { public long getValue() {
return crc16.getValue(); return crc16.getValue();

View File

@ -377,4 +377,9 @@ public class Column implements Serializable, Cloneable {
public String toString() { public String toString() {
return "Column [tableName=" + tableName + ", name=" + name + ", type=" + type + ", size=" + size + ", isNullable=" + isNullable + "]"; return "Column [tableName=" + tableName + ", name=" + name + ", type=" + type + ", size=" + size + ", isNullable=" + isNullable + "]";
} }
@Override
public Column clone() throws CloneNotSupportedException {
return (Column) super.clone();
}
} }

View File

@ -252,7 +252,7 @@ public class JSONUtil {
return XML.toJSONObject(xmlStr); return XML.toJSONObject(xmlStr);
} }
// -------------------------------------------------------------------- Pause end // -------------------------------------------------------------------- Parse end
// -------------------------------------------------------------------- Read start // -------------------------------------------------------------------- Read start