Package org.jboss.jca.codegenerator
Class Utils
- java.lang.Object
-
- org.jboss.jca.codegenerator.Utils
-
public class Utils extends Object
A Utils.- Version:
- $Revision: $
-
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcopyFolder(String sourcePath, String targetPath, String filterName)copy foldersstatic FileWritercreateFile(String name, String outDir)Create filestatic FileWritercreateSrcFile(String name, String packageName, String outDir)Create source filestatic FileWritercreateTestFile(String name, String packageName, String outDir)Create test filestatic StringreadFileIntoString(URL input)Reads the contents of a file into a string variable.static voidrecursiveDelete(File f)Recursive delete
-
-
-
Method Detail
-
readFileIntoString
public static String readFileIntoString(URL input) throws IOException
Reads the contents of a file into a string variable.- Parameters:
input- url- Returns:
- string of return
- Throws:
IOException- ioException
-
createSrcFile
public static FileWriter createSrcFile(String name, String packageName, String outDir) throws IOException
Create source file- Parameters:
name- The name of the classpackageName- The package nameoutDir- output directory- Returns:
- The file
- Throws:
IOException- Thrown if an error occurs
-
createTestFile
public static FileWriter createTestFile(String name, String packageName, String outDir) throws IOException
Create test file- Parameters:
name- The name of the classpackageName- The package nameoutDir- output directory- Returns:
- The file
- Throws:
IOException- Thrown if an error occurs
-
createFile
public static FileWriter createFile(String name, String outDir) throws IOException
Create file- Parameters:
name- The name of the classoutDir- output directory- Returns:
- The file
- Throws:
IOException- Thrown if an error occurs
-
recursiveDelete
public static void recursiveDelete(File f) throws IOException
Recursive delete- Parameters:
f- The file handler- Throws:
IOException- Thrown if a file could not be deleted
-
copyFolder
public static void copyFolder(String sourcePath, String targetPath, String filterName) throws IOException
copy folders- Parameters:
sourcePath- source foldertargetPath- target folderfilterName- filter name- Throws:
IOException- Thrown if an error occurs
-
-