public class Files extends Object
| Constructor and Description |
|---|
Files() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
cleanFolder(File parentFolder,
FileFilter filter,
boolean continueOnError,
boolean deleteParentFolder) |
static void |
copyFiles(String sourceDir,
String targetDir,
List<String> files) |
static String |
readFileIntoString(String filename) |
static byte[] |
readStreamIntoByteArray(InputStream inputStream) |
static String |
readStreamIntoString(InputStream inputStream) |
static boolean |
sweepFolder(File folder)
This will completely sweep the given folder.
|
static void |
writeStringIntoFile(String filename,
String content) |
public static boolean cleanFolder(File parentFolder, FileFilter filter, boolean continueOnError, boolean deleteParentFolder) throws FileNotFoundException
FileNotFoundExceptionpublic static boolean sweepFolder(File folder) throws FileNotFoundException
cleanFolder(File, FileFilter, boolean, boolean) if you want to preserve CVS or SVN information.folder - to deletetrue if all content was successfully deletedFileNotFoundException - if folder does not existspublic static byte[] readStreamIntoByteArray(InputStream inputStream)
public static String readStreamIntoString(InputStream inputStream)
Copyright © 2015. All Rights Reserved.