public class FileWrapper
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected java.nio.charset.Charset |
charset |
static java.nio.charset.Charset |
DEFAULT_CHARSET
默认编码:UTF-8
|
protected java.io.File |
file |
| 构造器和说明 |
|---|
FileWrapper(java.io.File file,
java.nio.charset.Charset charset)
构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
java.nio.charset.Charset |
getCharset()
获得字符集编码
|
java.io.File |
getFile()
获得文件
|
java.lang.String |
readableFileSize()
可读的文件大小
|
FileWrapper |
setCharset(java.nio.charset.Charset charset)
设置字符集编码
|
FileWrapper |
setFile(java.io.File file)
设置文件
|
protected java.io.File file
protected java.nio.charset.Charset charset
public static final java.nio.charset.Charset DEFAULT_CHARSET
public FileWrapper(java.io.File file,
java.nio.charset.Charset charset)
file - 文件charset - 编码,使用 CharsetUtilpublic java.io.File getFile()
public FileWrapper setFile(java.io.File file)
file - 文件public java.nio.charset.Charset getCharset()
public FileWrapper setCharset(java.nio.charset.Charset charset)
charset - 编码public java.lang.String readableFileSize()
Copyright © 2018. All rights reserved.