public class FileUtil extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
copyFile(String sourceURL,
String destFilePath) |
static File |
createEmptyDir(String path) |
static File |
createTemporaryDirectory(String prefix) |
static boolean |
deleteDirectory(File directory) |
static byte[] |
getBytes(String filePath)
get content from file
|
static String |
getContent(File file) |
static String |
getContent(String filePath)
get content from file
|
static void |
saveContent(byte[] bb,
File file) |
static void |
saveContent(String content,
File file) |
static void |
unzip(String file,
String destFolder) |
public static void unzip(String file, String destFolder) throws IOException
IOExceptionpublic static void copyFile(String sourceURL, String destFilePath) throws Exception
Exceptionpublic static boolean deleteDirectory(File directory)
public static byte[] getBytes(String filePath) throws IOException
filePath - IOExceptionpublic static String getContent(String filePath) throws IOException
filePath - IOExceptionpublic static String getContent(File file) throws IOException
file - IOExceptionpublic static void saveContent(String content, File file) throws IOException
content - file - IOExceptionpublic static void saveContent(byte[] bb,
File file)
throws IOException
bb - file - IOExceptionCopyright © 2017. All rights reserved.