public class FileReaderUtil extends Object
| 构造器和说明 |
|---|
FileReaderUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
main(String[] args) |
static String |
readFile(String filePath)
读取文本文件内容
|
static void |
readToBuffer(StringBuffer buffer,
String filePath)
将文本文件中的内容读入到buffer中
|
public static void readToBuffer(StringBuffer buffer, String filePath) throws IOException
buffer - bufferfilePath - 文件路径IOException - 异常public static String readFile(String filePath) throws IOException
filePath - 文件所在路径IOException - 异常public static void main(String[] args) throws IOException
IOExceptionCopyright © 2020. All rights reserved.