|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.soton.itinnovation.grid.utils.FileUtils
public class FileUtils
Utility methods for handling files.
| Constructor Summary | |
|---|---|
FileUtils()
|
|
| Method Summary | |
|---|---|
static void |
copyFile(File src,
File dest)
|
static File |
fileFromPath(String parent,
String... children)
|
static String |
getStringFromFile(String fileName)
Get a string out of a file given its filename |
static String |
getStringFromResource(ClassLoader loader,
String resourceName)
Get a resource from a class loader and load it into a string. |
static String |
getStringFromResource(String resourceName)
Wrapper for getStringFromResource that uses FileUtils's own class loader. |
static void |
mkdir(File dir)
|
static Document |
parseXML(byte[] bytes)
|
static Document |
parseXML(File xml)
|
static Document |
parseXML(InputStream is)
|
static Document |
parseXML(String xmlString)
|
static void |
rmTree(File dir)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileUtils()
| Method Detail |
|---|
public static String getStringFromFile(String fileName)
fileName - the name of the file inc path
public static String getStringFromResource(String resourceName)
throws IOException
IOException
public static String getStringFromResource(ClassLoader loader,
String resourceName)
throws IOException
loader - the classloader (usually, getClass().getClassLoader())resourceName - the full name of the resource to load
IOException
public static void copyFile(File src,
File dest)
throws IOException
IOExceptionpublic static void rmTree(File dir)
public static Document parseXML(String xmlString)
public static Document parseXML(byte[] bytes)
public static Document parseXML(InputStream is)
public static Document parseXML(File xml)
public static void mkdir(File dir)
public static File fileFromPath(String parent,
String... children)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||