public abstract class FileUtils extends Object
| Constructor and Description |
|---|
FileUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyFile(String from,
String to) |
static boolean |
deleteDir(File dir)
Delete directory structure.
|
static byte[] |
readFile(File file)
Read the contents of the specified file.
|
static void |
writeFile(byte[] bytes,
File file) |
public static void copyFile(String from, String to) throws IOException
IOExceptionpublic static byte[] readFile(File file) throws IOException
file - The file to read.IOException - Error readiong file.public static void writeFile(byte[] bytes,
File file)
throws IOException
IOExceptionpublic static boolean deleteDir(File dir)
dir - The directory to be deleted.Copyright © 2020. All rights reserved.