|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrle.util.FileUtil
public class FileUtil
Some useful File utilities.
Constructor Summary | |
---|---|
FileUtil()
|
Method Summary | |
---|---|
static long |
getCumulativeSize(java.io.File file)
|
static long |
getCumulativeSize(java.io.File[] files)
This returns a long value for the size of the file array supplied, which can be either files and/or directories |
static java.lang.String |
getExt(java.lang.String string)
returns the extension of a file returns null if none found... |
static java.lang.String |
getFile(java.io.InputStream is)
|
static java.lang.String |
getFile(java.lang.String file)
|
static java.lang.String |
getFile(java.net.URL url)
|
static int |
getNumberOfFiles(java.io.File file)
|
static int |
getNumberOfFiles(java.io.File[] files)
|
static java.util.Set |
getRelativePathsOfChildren(java.io.File file)
Returns a set of Strings that represent the relative paths of all child files under the file provided. |
protected static java.util.Set |
getRelativePathsOfChildren(java.io.File file,
java.lang.String basePath)
|
protected static java.util.Set |
getRelativePathsOfChildren(java.io.File file,
java.lang.String basePath,
boolean leadingSlash)
|
static void |
writeFile(java.lang.String filePath,
java.lang.String contents)
|
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 java.lang.String getExt(java.lang.String string)
public static java.lang.String getFile(java.lang.String file)
file
-
public static java.lang.String getFile(java.io.InputStream is)
public static java.lang.String getFile(java.net.URL url)
public static void writeFile(java.lang.String filePath, java.lang.String contents) throws java.io.IOException
java.io.IOException
public static long getCumulativeSize(java.io.File[] files)
file
-
public static long getCumulativeSize(java.io.File file)
public static int getNumberOfFiles(java.io.File[] files)
public static int getNumberOfFiles(java.io.File file)
protected static java.util.Set getRelativePathsOfChildren(java.io.File file, java.lang.String basePath)
protected static java.util.Set getRelativePathsOfChildren(java.io.File file, java.lang.String basePath, boolean leadingSlash)
public static java.util.Set getRelativePathsOfChildren(java.io.File file)
file
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |