public final class FileUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
exportResource(java.io.InputStream in,
java.lang.String destination)
Export an inputstream into an external file
|
static java.lang.String |
md5Checksum(java.io.File file)
Get the md5 hash/checksum of a file
|
static java.lang.String |
readEmbedToString(java.lang.String path)
Gets the raw plaintext content of an embedded file.
|
static java.lang.String |
readEmbedToString(java.lang.String path,
java.lang.Class<?> clazz)
Gets the raw plaintext content of an embedded file.
|
static java.lang.String |
readFileToString(java.io.File file)
Gets the raw plaintext content of a file
|
public static void exportResource(java.io.InputStream in,
java.lang.String destination)
throws java.lang.Exception
in - InputStreamdestination - Destination pathjava.lang.Exception - IO errorpublic static java.lang.String readFileToString(java.io.File file)
throws java.lang.Exception
file - File to readjava.lang.Exception - when read process errorspublic static java.lang.String readEmbedToString(java.lang.String path)
throws java.lang.Exception
path - Path of the filejava.lang.Exception - when read process errorspublic static java.lang.String readEmbedToString(java.lang.String path,
java.lang.Class<?> clazz)
throws java.lang.Exception
path - Path of the fileclazz - Class to get the resource from.java.lang.Exception - when read process errorspublic static java.lang.String md5Checksum(java.io.File file)
throws java.lang.Exception
file - Filejava.lang.Exception - IO exception