public class FileUtil extends Object
| Constructor and Description |
|---|
FileUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
readFile(String filePath)
读取文本文件内容
|
static void |
readToBuffer(StringBuffer buffer,
String filePath)
将文本文件中的内容读入到buffer中
|
static void |
writeFile(String filePath,
String input)
将字符串写如文件
|
public static void writeFile(String filePath, String input) throws IOException
IOExceptionpublic static String readFile(String filePath) throws IOException
IOExceptionpublic static void readToBuffer(StringBuffer buffer, String filePath) throws IOException
IOExceptionCopyright © 2021. All rights reserved.