public class FileTools extends Object
| Constructor and Description |
|---|
FileTools() |
| Modifier and Type | Method and Description |
|---|---|
static void |
deleteDirectory(NodeFile nodeFile) |
static String |
getFileContent(File file)
Get the file content as String
|
static String |
getFileContent(NodeFile nodeFile)
Get the file content as String
|
static void |
writeFile(File file,
String content)
Writes the content string inside the target file.
|
static void |
writeFile(NodeFile nodeFile,
String content)
Writes the content string inside the target file.
|
public static void writeFile(File file, String content) throws FileNotFoundException, UnsupportedEncodingException
file - content - FileNotFoundExceptionUnsupportedEncodingExceptionpublic static void writeFile(NodeFile nodeFile, String content) throws FileNotFoundException, IOException, InterruptedException
nodeFile - content - FileNotFoundExceptionInterruptedExceptionIOExceptionpublic static String getFileContent(File file) throws IOException
file - IOExceptionpublic static String getFileContent(NodeFile nodeFile) throws IOException, InterruptedException
nodeFile - IOExceptionInterruptedExceptionpublic static void deleteDirectory(NodeFile nodeFile) throws IOException, InterruptedException
IOExceptionInterruptedExceptionCopyright © 2016–2017. All rights reserved.