|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.soa.esb.util.FileUtil
public class FileUtil
Common file utility functions.
Constructor Summary | |
---|---|
FileUtil()
|
Method Summary | |
---|---|
static byte[] |
readFile(java.io.File file)
Read the contents of a file and return it as a byte array. |
static java.lang.String |
readTextFile(java.io.File file)
Read the file into a String. |
static boolean |
renameTo(java.io.File from,
java.io.File to)
Attempt to rename a file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileUtil()
Method Detail |
---|
public static boolean renameTo(java.io.File from, java.io.File to)
from
- The original fileto
- The destination file.
public static java.lang.String readTextFile(java.io.File file) throws java.io.IOException
file
- - the file to be read
java.io.IOException
- - when we can't read the filepublic static byte[] readFile(java.io.File file) throws java.io.IOException
file
- The file to be read.
java.io.IOException
- Error reading the file.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |