|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.grelf.grip.FileIO
public class FileIO
Various useful static methods for file handling. This class cannot be instantiated. It has a javax.swing.JFileChooser object so that successive calls to methods here keep track of the last directory used, for the user's convenience.
Method Summary | |
---|---|
static void |
copyFile(java.lang.String srcPath,
java.lang.String dstPath)
Copy any file. |
static javax.swing.filechooser.FileFilter |
getCurrentFilter()
|
static java.lang.String |
getExtension(java.lang.String filename)
Get the file extension, including the dot. |
static boolean |
isXmlFile(java.lang.String filePath)
Reads the first 5 characters of the given file to see whether they are >?xml New 9.12.3 |
static java.lang.String |
removeExtension(java.lang.String filename)
Remove the file extension, including the dot. |
static java.lang.String |
selectInputFile(java.lang.String title)
Returns null if user leaves the file selection dialogue by the cancel button. |
static java.lang.String |
selectInputFile(java.lang.String title,
java.lang.String folderName)
Returns null if user leaves the file selection dialogue by the cancel button. |
static java.lang.String |
selectInputFile(java.lang.String title,
java.lang.String folderName,
javax.swing.filechooser.FileFilter[] filters)
Returns null if user leaves the file selection dialogue by the cancel button. |
static java.lang.String |
selectInputFile(java.lang.String title,
java.lang.String folderName,
javax.swing.filechooser.FileFilter[] filters,
java.lang.String initialFileName)
Returns null if user leaves the file selection dialogue by the cancel button. |
static java.io.File[] |
selectInputFiles(java.lang.String title)
Returns null if user leaves the file selection dialogue by the cancel button. |
static java.io.File[] |
selectInputFiles(java.lang.String title,
java.lang.String folderName)
Returns null if user leaves the file selection dialogue by the cancel button. |
static java.io.File[] |
selectInputFiles(java.lang.String title,
java.lang.String folderName,
javax.swing.filechooser.FileFilter[] filters)
Returns null if user leaves the file selection dialogue by the cancel button. |
static java.lang.String |
selectOutputFile(java.lang.String title)
Returns null if user leaves the file selection dialogue by the cancel button. |
static java.lang.String |
selectOutputFile(java.lang.String title,
java.lang.String folderName)
Returns null if user leaves the file selection dialogue by the cancel button. |
static java.lang.String |
selectOutputFile(java.lang.String title,
java.lang.String folderName,
javax.swing.filechooser.FileFilter[] filters)
Returns null if user leaves the file selection dialogue by the cancel button. |
static java.lang.String |
selectOutputFile(java.lang.String title,
java.lang.String folderName,
javax.swing.filechooser.FileFilter[] filters,
java.lang.String initialFileName)
Returns null if user leaves the file selection dialogue by the cancel button. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void copyFile(java.lang.String srcPath, java.lang.String dstPath) throws java.io.IOException
java.io.IOException
public static java.lang.String getExtension(java.lang.String filename)
public static boolean isXmlFile(java.lang.String filePath)
public static java.lang.String removeExtension(java.lang.String filename)
public static java.lang.String selectInputFile(java.lang.String title)
public static java.lang.String selectInputFile(java.lang.String title, java.lang.String folderName)
public static java.lang.String selectInputFile(java.lang.String title, java.lang.String folderName, javax.swing.filechooser.FileFilter[] filters)
public static java.lang.String selectInputFile(java.lang.String title, java.lang.String folderName, javax.swing.filechooser.FileFilter[] filters, java.lang.String initialFileName)
public static java.io.File[] selectInputFiles(java.lang.String title)
public static java.io.File[] selectInputFiles(java.lang.String title, java.lang.String folderName)
public static java.io.File[] selectInputFiles(java.lang.String title, java.lang.String folderName, javax.swing.filechooser.FileFilter[] filters)
public static java.lang.String selectOutputFile(java.lang.String title)
public static java.lang.String selectOutputFile(java.lang.String title, java.lang.String folderName)
public static java.lang.String selectOutputFile(java.lang.String title, java.lang.String folderName, javax.swing.filechooser.FileFilter[] filters)
public static java.lang.String selectOutputFile(java.lang.String title, java.lang.String folderName, javax.swing.filechooser.FileFilter[] filters, java.lang.String initialFileName)
public static javax.swing.filechooser.FileFilter getCurrentFilter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |