|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jaulp.file.FileUtils
public class FileUtils
Utility class for the use of File object. Most methods are set to deprecated and has gone to the appropriate class.
| Constructor Summary | |
|---|---|
protected |
FileUtils()
|
| Method Summary | |
|---|---|
static boolean |
copyFile(java.io.File source,
java.io.File destination)
Deprecated. Use instead the method CopyFileUtils.copyFile(source, destination). |
static boolean |
createDirectory(java.io.File dir)
Deprecated. Use instead the method CreateFileUtils.createDirectory(File). |
static boolean |
createFile(java.io.File file)
Deprecated. Use instead the method CreateFileUtils.createFile(File). |
static byte[] |
download(java.net.URI uri)
Downloads Data from the given URI. |
static java.lang.String |
getAbsolutPathWithoutFilename(java.io.File file)
Gets the absolut path without the filename. |
static java.lang.String |
getCurrentAbsolutPathWithoutDotAndSlash()
Gets the current absolut path without the dot and slash. |
static java.lang.String |
getFilenamePrefix(java.io.File file)
Gets the filename with the absolute path prefix. |
static java.lang.String |
getFilenameSuffix(java.io.File file)
Gets the filename suffix or null if no suffix exists or the given file object is a directory. |
static java.lang.String |
getFilenameWithoutExtension(java.io.File file)
Gets the filename without the extension or null if the given file object is a directory. |
static boolean |
isOpen(java.io.File file)
Not yet implemented. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected FileUtils()
| Method Detail |
|---|
public static boolean copyFile(java.io.File source,
java.io.File destination)
throws java.io.IOException,
FileIsADirectoryException
source - The source file.destination - The destination file.
java.io.IOException - Is thrown if an error occurs by reading or writing.
FileIsADirectoryException - Is thrown if the destination file is a directory.
public static boolean createDirectory(java.io.File dir)
throws DirectoryAllreadyExistsException
dir - The directory to create.
DirectoryAllreadyExistsException - Thrown if the directory all ready exists.
public static boolean createFile(java.io.File file)
throws java.io.IOException
file - the file.
java.io.IOException - Signals that an I/O exception has occurred.public static byte[] download(java.net.URI uri)
uri - The URI from where to download.
public static java.lang.String getAbsolutPathWithoutFilename(java.io.File file)
file - the file.
public static java.lang.String getCurrentAbsolutPathWithoutDotAndSlash()
public static java.lang.String getFilenamePrefix(java.io.File file)
file - the file.
public static java.lang.String getFilenameWithoutExtension(java.io.File file)
file - the file.
public static java.lang.String getFilenameSuffix(java.io.File file)
file - the file.
public static boolean isOpen(java.io.File file)
file - The file to check.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||