This commit is contained in:
Looly
2022-03-16 10:32:22 +08:00
parent 3bbfce95ac
commit 604f84595e
2 changed files with 6 additions and 2 deletions

View File

@@ -26,7 +26,8 @@ public class FileAppender implements Serializable{
private final int capacity;
/** 追加内容是否为新行 */
private final boolean isNewLineMode;
private final List<String> list = new ArrayList<>(100);
/** 数据行缓存 */
private final List<String> list;
/**
* 构造
@@ -49,6 +50,7 @@ public class FileAppender implements Serializable{
*/
public FileAppender(File destFile, Charset charset, int capacity, boolean isNewLineMode) {
this.capacity = capacity;
this.list = new ArrayList<>(capacity);
this.isNewLineMode = isNewLineMode;
this.writer = FileWriter.create(destFile, charset);
}