
public class Utils extends Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyFolder(String sourcePath,
String targetPath,
String filterName)
copy folders
|
static FileWriter |
createFile(String name,
String outDir)
Create file
|
static FileWriter |
createSrcFile(String name,
String packageName,
String outDir)
Create source file
|
static FileWriter |
createTestFile(String name,
String packageName,
String outDir)
Create test file
|
static String |
readFileIntoString(URL input)
Reads the contents of a file into a string variable.
|
static void |
recursiveDelete(File f)
Recursive delete
|
public static String readFileIntoString(URL input) throws IOException
input - urlIOException - ioExceptionpublic static FileWriter createSrcFile(String name, String packageName, String outDir) throws IOException
name - The name of the classpackageName - The package nameoutDir - output directoryIOException - Thrown if an error occurspublic static FileWriter createTestFile(String name, String packageName, String outDir) throws IOException
name - The name of the classpackageName - The package nameoutDir - output directoryIOException - Thrown if an error occurspublic static FileWriter createFile(String name, String outDir) throws IOException
name - The name of the classoutDir - output directoryIOException - Thrown if an error occurspublic static void recursiveDelete(File f) throws IOException
f - The file handlerIOException - Thrown if a file could not be deletedpublic static void copyFolder(String sourcePath, String targetPath, String filterName) throws IOException
sourcePath - source foldertargetPath - target folderfilterName - filter nameIOException - Thrown if an error occursCopyright © 2012 JBoss, by Red Hat (http://www.jboss.org/ironjacamar)