|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.extensions.util.FileUtils
This class provides some methods for load and saving data from/to a file
Constructor Summary | |
FileUtils()
|
Method Summary | |
static byte[] |
loadBinary(java.io.File file)
Load the given file and return the content. |
static byte[] |
loadBinary(java.io.File parentDir,
java.lang.String name)
Load the given file and return the content. |
static byte[] |
loadBinary(java.lang.String name)
Load the given file and return the content. |
static void |
saveBinary(java.io.File file,
byte[] data)
Save the binary content to a file |
static void |
saveBinary(java.io.File parentDir,
java.lang.String name,
byte[] data)
Save the binary content to a file |
static void |
saveBinary(java.lang.String name,
byte[] data)
Save the binary content to a file |
static void |
saveInputStream(java.io.File file,
java.io.InputStream is)
Save the content of an input stream to a file |
static void |
saveInputStream(java.io.File parentDir,
java.lang.String name,
java.io.InputStream is)
Save the content of an input stream to a file |
static void |
saveInputStream(java.lang.String name,
java.io.InputStream is)
Save the content of an input stream to a file |
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 byte[] loadBinary(java.io.File file)
file
- the file to be loadedpublic static byte[] loadBinary(java.io.File parentDir, java.lang.String name)
parentDir
- the parent directoryname
- the name of the file within the parentb directorypublic static byte[] loadBinary(java.lang.String name)
name
- the name of the file to be loadedpublic static void saveBinary(java.lang.String name, byte[] data)
name
- the name of the file to store the datadata
- the data to be storedpublic static void saveBinary(java.io.File parentDir, java.lang.String name, byte[] data)
parentDir
- the parent directory where to store the dataname
- the name of the file to store the datadata
- the data to be storedpublic static void saveBinary(java.io.File file, byte[] data)
file
- the file to store the datadata
- the data to be storedpublic static void saveInputStream(java.lang.String name, java.io.InputStream is)
name
- the name of the file to store the datais
- the input stream to write to a filepublic static void saveInputStream(java.io.File parentDir, java.lang.String name, java.io.InputStream is)
parentDir
- the parent directory where to store the dataname
- the name of the file to store the datais
- the input stream to write to a filepublic static void saveInputStream(java.io.File file, java.io.InputStream is)
file
- the file to store the datais
- the input stream to write to a file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |