public class FileWrapper extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Charset |
charset |
static Charset |
DEFAULT_CHARSET
默认编码:UTF-8
|
protected File |
file |
Constructor and Description |
---|
FileWrapper(File file,
Charset charset)
构造
|
Modifier and Type | Method and Description |
---|---|
Charset |
getCharset()
获得字符集编码
|
File |
getFile()
获得文件
|
String |
readableFileSize()
可读的文件大小
|
FileWrapper |
setCharset(Charset charset)
设置字符集编码
|
FileWrapper |
setFile(File file)
设置文件
|
protected File file
protected Charset charset
public static final Charset DEFAULT_CHARSET
public FileWrapper(File file, Charset charset)
file
- 文件charset
- 编码,使用 CharsetUtil
public File getFile()
public FileWrapper setFile(File file)
file
- 文件public Charset getCharset()
public FileWrapper setCharset(Charset charset)
charset
- 编码public String readableFileSize()
Copyright © 2024. All rights reserved.