|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.af.commons.io.FileTools
public class FileTools
This class provides miscellaneous static methods for handling files.
| Constructor Summary | |
|---|---|
FileTools()
|
|
| Method Summary | |
|---|---|
static String |
getBaseName(File file)
Returns the filename without last suffix. |
static String |
readFileAsString(File file)
|
static File |
selectFile(Component comp,
File prevFile,
int fileSelectionMode)
Opens a JFileChooser for selecting a file or directory. |
static File |
selectFile(Component comp,
int fileSelectionMode)
Opens a JFileChooser for selecting a file or directory. |
static File |
selectFile(Component comp,
String prevFile,
int fileSelectionMode)
Opens a JFileChooser for selecting a file or directory. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileTools()
| Method Detail |
|---|
public static String getBaseName(File file)
public static File selectFile(Component comp,
String prevFile,
int fileSelectionMode)
comp - the parent component of the dialog,
can be null;prevFile - previously chosen filefileSelectionMode - from JFileChooser
null if no file was selected
public static File selectFile(Component comp,
int fileSelectionMode)
comp - the parent component of the dialog,
can be null;fileSelectionMode - from JFileChooser
null if no file was selected
public static File selectFile(Component comp,
File prevFile,
int fileSelectionMode)
comp - the parent component of the dialog,
can be null;prevFile - previously chosen filefileSelectionMode - from JFileChooser
null if no file was selected
public static String readFileAsString(File file)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||