public class FileUtility extends Object
| Constructor and Description |
|---|
FileUtility() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyFile(File srcPath,
File dstPath) |
static void |
copyFile(String srcPath,
String dstPath) |
static String |
decodePath(String path) |
static boolean |
deleteDirectory(File path)
Deletes Directory with Files.
|
static boolean |
deleteDirectory(String dir) |
static void |
extractJar(String storeLocation,
Class<?> clz) |
static String |
getLatestFile(String folder) |
static String |
readFromFile(File path)
Read contents of a file.
|
static String |
readFromFile(InputStream path)
Read contents From Stream.
|
static void |
writeImage(String path,
byte[] byteArray)
Constructs ImageElement from bytes and stores it.
|
static void |
writeToFile(String path,
String content)
Saves HTML Source.
|
public static void extractJar(String storeLocation, Class<?> clz) throws IOException
IOExceptionpublic static void copyFile(File srcPath, File dstPath) throws IOException
IOExceptionpublic static void copyFile(String srcPath, String dstPath) throws IOException
IOExceptionpublic static boolean deleteDirectory(File path)
path - public static boolean deleteDirectory(String dir)
public static String readFromFile(File path) throws IOException
path - IOExceptionpublic static String readFromFile(InputStream path) throws IOException
path - IOExceptionpublic static void writeImage(String path, byte[] byteArray)
path - public static void writeToFile(String path, String content) throws IOException
path - ExceptionIOExceptionpublic static String decodePath(String path) throws UnsupportedEncodingException
UnsupportedEncodingExceptionCopyright © 2021. All rights reserved.