|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object endrov.util.io.EvFileUtil
public class EvFileUtil
Utility functions for files
Constructor Summary | |
---|---|
EvFileUtil()
|
Method Summary | |
---|---|
static void |
copy(java.io.File source,
java.io.File destination)
Copy file from one location to another |
static void |
deleteRecursive(java.io.File f)
Delete directory or file recursively |
static java.lang.String |
fileEnding(java.io.File file)
Return file ending not including the dot, or null if there is none |
static java.io.File |
getFileFromURL(java.net.URL urlToDecode)
Work-around for a bug/faulty design in getResource().getFile(), making space %20 etc |
static java.io.File |
makeFileEnding(java.io.File f,
java.lang.String end)
Make sure filename ends with ending, that must include a "." if wanted |
static java.lang.String |
readFile(java.io.File file)
Read file into string |
static byte[] |
readFileRaw(java.io.File file)
|
static java.lang.String |
readStream(java.io.InputStream is)
Read stream into string |
static void |
touchRecursive(java.io.File f,
long timestamp)
|
static void |
writeFile(java.io.File file,
java.lang.String out)
Write string to file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EvFileUtil()
Method Detail |
---|
public static java.io.File getFileFromURL(java.net.URL urlToDecode)
public static java.lang.String readFile(java.io.File file) throws java.io.IOException
java.io.IOException
public static byte[] readFileRaw(java.io.File file) throws java.io.IOException
java.io.IOException
public static java.lang.String readStream(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public static void writeFile(java.io.File file, java.lang.String out) throws java.io.IOException
java.io.IOException
public static void touchRecursive(java.io.File f, long timestamp)
public static java.lang.String fileEnding(java.io.File file)
public static java.io.File makeFileEnding(java.io.File f, java.lang.String end)
public static void deleteRecursive(java.io.File f) throws java.io.IOException
java.io.IOException
public static void copy(java.io.File source, java.io.File destination) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |