org.knopflerfish.ant.taskdefs.bundle
public class FileUtil extends java.lang.Object
| Constructor and Description |
|---|
FileUtil() |
| Modifier and Type | Method and Description |
|---|---|
static org.w3c.dom.Document |
createXML(java.lang.String rootElement)
Create an empty DOM-document.
|
static java.lang.String |
load(java.lang.String fileOrURL)
Load entire contents of a file or URL into a string.
|
static java.lang.String |
loadFile(java.lang.String fname) |
static byte[] |
loadURL(java.net.URL url) |
static org.w3c.dom.Document |
loadXML(java.io.File file)
Load an XML-formated file into a DOM-document.
|
static void |
writeDocumentToFile(java.io.File outFile,
org.w3c.dom.Document doc) |
static void |
writeStringToFile(java.io.File outFile,
java.lang.String s) |
public static byte[] loadURL(java.net.URL url)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String loadFile(java.lang.String fname)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String load(java.lang.String fileOrURL)
throws java.io.IOException
java.io.IOExceptionpublic static org.w3c.dom.Document loadXML(java.io.File file)
file - The XML file to load.public static org.w3c.dom.Document createXML(java.lang.String rootElement)
rootElement - The name of the root element of the new document.public static void writeStringToFile(java.io.File outFile,
java.lang.String s)
throws java.io.IOException
java.io.IOExceptionpublic static void writeDocumentToFile(java.io.File outFile,
org.w3c.dom.Document doc)