|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectverinec.util.FileUtil
public class FileUtil
Utility functions for file system manipulations.
| Constructor Summary | |
|---|---|
private |
FileUtil()
Do not instantiate FileUtil, it contains only static methods. |
| Method Summary | |
|---|---|
static File |
createTempDir(String prefix)
Create a temporary directory in the tmp directory. |
static void |
deltree(File dir)
Delete directories and files recursively. |
static File[] |
findFiles(File dir,
String beginwith)
Return all files in a directory beginning with a certain String. |
static String |
readFileAsString(InputStream in)
Read input stream and put content into String. |
static void |
saveXMLElement(Element element,
String fileName)
Saves an Element into a File. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
private FileUtil()
| Method Detail |
|---|
public static File createTempDir(String prefix)
throws IOException
prefix - A prefix for the directory name.
IOException - if the temporary dir can not be created.
public static void deltree(File dir)
throws IOException
dir - A file denoting an existing directory or file to be deleted.
IOException - if the directory or some of its content can not be deleted.
public static void saveXMLElement(Element element,
String fileName)
throws VerinecException
element - the Element to be saved.fileName - filename into which the Element is written.
VerinecException - if the Element is null or an IO Error happens when writing the file.
public static String readFileAsString(InputStream in)
throws IOException
in - The input stream with the data
IOException - If opening or reading the file fails
public static File[] findFiles(File dir,
String beginwith)
dir - the directory to parsebeginwith - the type of the files to return
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||