enjoy 3.5

This commit is contained in:
James
2018-08-14 23:11:21 +08:00
parent 462c70b692
commit 8d88d0bba4

View File

@@ -97,7 +97,7 @@ public class FastStringWriter extends Writer {
}
static int MAX_SIZE = 1024 * 128;
static int MAX_SIZE = 1024 * 64;
/**
* 由 StringWriter.close() 改造而来,原先该方法中无任何代码 ,改造如下:
@@ -107,7 +107,7 @@ public class FastStringWriter extends Writer {
*/
public void close() {
if (buf.length() > MAX_SIZE) {
buf = new StringBuilder(); // 释放空间占用过大的 buf
buf = new StringBuilder(MAX_SIZE / 2); // 释放空间占用过大的 buf
} else {
buf.setLength(0);
}