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
- FileNotFoundException
UnsupportedEncodingException
public static void writeFile(NodeFile nodeFile, String content) throws FileNotFoundException, IOException, InterruptedException
nodeFile
- content
- FileNotFoundException
InterruptedException
IOException
public static String getFileContent(File file) throws IOException
file
- IOException
public static String getFileContent(NodeFile nodeFile) throws IOException, InterruptedException
nodeFile
- IOException
InterruptedException
public static void deleteDirectory(NodeFile nodeFile) throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2016–2017. All rights reserved.