|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.rej.util.FileToolkit
public class FileToolkit
FileToolkit class contains file utility functions.
| Method Summary | |
|---|---|
static java.io.File |
createNewFile(java.io.File path,
java.lang.String suffix)
|
static void |
deleteRecursively(java.io.File folder)
Deletes a directory and all of it's subdirectories. |
static byte[] |
readBytes(java.io.File f)
Read the contents of the File into a byte array and return it. |
static java.lang.String |
readFile(java.io.File f)
Read the contents of File f into a String and return it. |
static void |
writeBytes(java.io.File f,
byte[] bytes)
Write bytes[] into File f. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String readFile(java.io.File f)
throws java.io.IOException
f - Indicates the file to read.
java.io.IOException - - Exception while reading file
public static byte[] readBytes(java.io.File f)
throws java.io.IOException
f - File The File to read.
java.io.IOException - Exception while reading file
public static void writeBytes(java.io.File f,
byte[] bytes)
throws java.io.IOException
f - File File to create/overwritebytes - byte[] data to write into the file
java.io.IOException - Exception while writing file
public static void deleteRecursively(java.io.File folder)
throws java.io.IOException
folder - File file or directory to delete.
java.io.IOException - Exception while deleting
public static java.io.File createNewFile(java.io.File path,
java.lang.String suffix)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||