|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.limegroup.gnutella.util.FileUtils
This class provides static functions to load/store the files.
| Constructor Summary | |
FileUtils()
|
|
| Method Summary | |
static java.io.File |
getCanonicalFile(java.io.File f)
Same as f.getCanonicalFile() in JDK1.3. |
static java.lang.String |
getFileExtension(java.io.File f)
Utility method that returns the file extension of the given file. |
static java.io.File |
getParentFile(java.io.File f)
Same as f.getParentFile() in JDK1.3. |
static java.io.File[] |
listFiles(java.io.File f)
Same as the f.listFiles() in JDK1.3. |
static java.io.File[] |
listFiles(java.io.File f,
java.io.FilenameFilter filter)
Same as f.listFiles(FileNameFilter) in JDK1.2 |
static java.util.Map |
readMap(java.lang.String filename)
Reads the map stored, in serialized object form, in the passed file and returns it. |
static boolean |
setWriteable(java.io.File f)
Utility method to set a file as non read only. |
static void |
writeMap(java.lang.String filename,
java.util.Map map)
Writes the passed map to corresponding 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 void writeMap(java.lang.String filename,
java.util.Map map)
throws java.io.IOException,
java.lang.ClassNotFoundException
filename - The name of the file to which to write the passed mapmap - The map to be stored
java.io.IOException
java.lang.ClassNotFoundException
public static java.util.Map readMap(java.lang.String filename)
throws java.io.IOException,
java.lang.ClassNotFoundException
filename - The file from where to read the Map
java.io.IOException
java.lang.ClassNotFoundExceptionpublic static java.io.File[] listFiles(java.io.File f)
public static java.io.File[] listFiles(java.io.File f,
java.io.FilenameFilter filter)
public static java.io.File getParentFile(java.io.File f)
public static java.io.File getCanonicalFile(java.io.File f)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String getFileExtension(java.io.File f)
f - the File instance that the extension should
be extracted from
public static boolean setWriteable(java.io.File f)
f - the File instance whose read only flag should
be unset.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||