public class FileUtil extends Object
| 构造器 | 说明 |
|---|---|
FileUtil() |
| 修饰符和类型 | 方法 | 说明 |
|---|---|---|
static long |
copy(InputStream input,
OutputStream output) |
|
static byte[] |
getBytes(String filePath) |
|
static String |
getContent(File file) |
|
static String |
getContent(String filePath) |
|
static void |
saveContent(byte[] bb,
File file) |
|
static void |
saveContent(InputStream is,
File file) |
|
static void |
saveContent(String content,
File file) |
public static String getContent(String filePath) throws IOException
filePath - IOExceptionpublic static String getContent(File file) throws IOException
file - IOExceptionpublic static byte[] getBytes(String filePath) throws IOException
filePath - IOExceptionpublic static void saveContent(String content, File file) throws IOException
content - file - IOExceptionpublic static void saveContent(InputStream is, File file) throws IOException
IOExceptionpublic static void saveContent(byte[] bb,
File file)
throws IOException
bb - file - IOExceptionpublic static long copy(InputStream input, OutputStream output) throws IOException
input - output - IOExceptionCopyright © 2019. All rights reserved.