mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
add methods
This commit is contained in:
parent
fa324608b2
commit
06e136f311
@ -23,6 +23,7 @@
|
||||
* 【setting】 修复Props中Charset对象无法序列化的问题(pr#1694@Github)
|
||||
* 【db 】 修复PageResult首页判断逻辑问题(issue#1699@Github)
|
||||
* 【core 】 修复IdcardUtil可能数组越界问题(pr#1702@Github)
|
||||
* 【core 】 修复FastByteArrayOutputStream索引越界问题(issue#I402ZP@Github)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -1602,6 +1602,18 @@ public class CollUtil {
|
||||
return null == enumeration || false == enumeration.hasMoreElements();
|
||||
}
|
||||
|
||||
/**
|
||||
* Map是否为空
|
||||
*
|
||||
* @param map 集合
|
||||
* @return 是否为空
|
||||
* @see MapUtil#isEmpty(Map)
|
||||
* @since 5.7.4
|
||||
*/
|
||||
public static boolean isEmpty(Map<?, ?> map) {
|
||||
return MapUtil.isEmpty(map);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------- isNotEmpty
|
||||
|
||||
/**
|
||||
@ -1658,6 +1670,18 @@ public class CollUtil {
|
||||
return IterUtil.hasNull(iterable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Map是否为非空
|
||||
*
|
||||
* @param map 集合
|
||||
* @return 是否为非空
|
||||
* @see MapUtil#isNotEmpty(Map)
|
||||
* @since 5.7.4
|
||||
*/
|
||||
public static boolean isNotEmpty(Map<?, ?> map) {
|
||||
return MapUtil.isNotEmpty(map);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------- zip
|
||||
|
||||
/**
|
||||
|
@ -68,6 +68,10 @@ public class FastByteArrayOutputStream extends OutputStream {
|
||||
*/
|
||||
public void writeTo(OutputStream out) throws IORuntimeException {
|
||||
final int index = buffer.index();
|
||||
if(index < 0){
|
||||
// 无数据写出
|
||||
return;
|
||||
}
|
||||
byte[] buf;
|
||||
try {
|
||||
for (int i = 0; i < index; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user