public class FileAppender extends Object implements Serializable
Constructor and Description |
---|
FileAppender(File destFile,
Charset charset,
int capacity,
boolean isNewLineMode)
构造
|
FileAppender(File destFile,
Charset charset,
int capacity,
boolean isNewLineMode,
Lock lock)
构造
|
FileAppender(File destFile,
int capacity,
boolean isNewLineMode)
构造
|
Modifier and Type | Method and Description |
---|---|
FileAppender |
append(String line)
追加
|
FileAppender |
flush()
刷入到文件
|
public FileAppender(File destFile, int capacity, boolean isNewLineMode)
destFile
- 目标文件capacity
- 当行数积累多少条时刷入到文件isNewLineMode
- 追加内容是否为新行public FileAppender(File destFile, Charset charset, int capacity, boolean isNewLineMode)
destFile
- 目标文件charset
- 编码capacity
- 当行数积累多少条时刷入到文件isNewLineMode
- 追加内容是否为新行public FileAppender append(String line)
line
- 行public FileAppender flush()
Copyright © 2024. All rights reserved.