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
IOException
public static void copyFile(File srcPath, File dstPath) throws IOException
IOException
public static void copyFile(String srcPath, String dstPath) throws IOException
IOException
public static boolean deleteDirectory(File path)
path
- public static boolean deleteDirectory(String dir)
public static String readFromFile(File path) throws IOException
path
- IOException
public static String readFromFile(InputStream path) throws IOException
path
- IOException
public static void writeImage(String path, byte[] byteArray)
path
- public static void writeToFile(String path, String content) throws IOException
path
- Exception
IOException
public static String decodePath(String path) throws UnsupportedEncodingException
UnsupportedEncodingException
Copyright © 2016. All rights reserved.