public abstract static class Utils.FileUtils
extends java.lang.Object
| Constructor and Description |
|---|
FileUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getMd5(java.io.File file)
Gets the MD5 hash of a file.
|
static byte[] |
readBytesFromFile(java.io.File file)
Reads the bytes of a file.
|
static java.lang.String |
readStringFromFile(java.io.File file)
Reads a text / string from a file.
|
static boolean |
writeBytesToFile(byte[] bytes,
java.io.File file)
Writes bytes to a file.
|
static boolean |
writeStringToFile(java.lang.String text,
java.io.File file)
Writes a string to file.
|
public static boolean writeStringToFile(java.lang.String text,
java.io.File file)
text - the text you want to write to a file.file - the target file.public static java.lang.String readStringFromFile(java.io.File file)
file - the target file.public static boolean writeBytesToFile(byte[] bytes,
java.io.File file)
bytes - the bytes you want to write to a file.file - the target file.public static byte[] readBytesFromFile(java.io.File file)
file - the target file.public static java.lang.String getMd5(java.io.File file)
file - the target file.