add default buffer size

This commit is contained in:
Looly 2019-08-16 19:47:59 +08:00
parent 796fac2458
commit a91686a7e1
3 changed files with 20 additions and 6 deletions

View File

@ -18,6 +18,7 @@
* 【setting】 构造Setting增加默认字符编码
* 【extra】 ServletUtil增加getHeaderMap方法
* 【poi】 CellUtil改进数字支持解决空指针问题pr#489@Github
* 【core】 增加DEFAULT_BUFFER_SIZE
### Bug修复
* 【cache】 修复missCount规则issue#465@Github

View File

@ -51,12 +51,12 @@ import cn.hutool.core.util.StrUtil;
*/
public class IoUtil {
/** 默认缓存大小 */
public static final int DEFAULT_BUFFER_SIZE = 2048;
/** 默认中等缓存大小 */
public static final int DEFAULT_MIDDLE_BUFFER_SIZE = 4096;
/** 默认大缓存大小 */
public static final int DEFAULT_LARGE_BUFFER_SIZE = 8192;
/** 默认缓存大小 8192*/
public static final int DEFAULT_BUFFER_SIZE = 2 << 12;
/** 默认中等缓存大小 16384*/
public static final int DEFAULT_MIDDLE_BUFFER_SIZE = 2 << 13;
/** 默认大缓存大小 32768*/
public static final int DEFAULT_LARGE_BUFFER_SIZE = 2 << 14;
/** 数据流末尾 */
public static final int EOF = -1;

View File

@ -0,0 +1,13 @@
package cn.hutool.core.io;
import org.junit.Test;
import cn.hutool.core.lang.Console;
public class IoUtilTest {
@Test
public void moveTest() {
Console.log(2 << 14);
}
}