org.glite.wmsui.guij
Class GUIFileSystem
java.lang.Object
org.glite.wmsui.guij.GUIFileSystem
- public class GUIFileSystem
- extends java.lang.Object
Implementation of the GUIFileSystem class. This class provides constant
values, variable values and utility methods connected to general file
handling.
- Version:
- 1.0
- Author:
- Giuseppe Avellino
Method Summary |
static void |
copyFile(java.io.File inputFile,
java.io.File outputFile)
|
static java.lang.String |
getFileExtension(java.io.File file)
Gets the extension of the input file. |
static java.lang.String |
readTextFile(java.io.File file)
|
static java.util.Vector |
readTextFileLines(java.lang.String fileName)
Reads the input file fileName producing a Vector of lines
(String). |
static void |
removeDirectoryDescendant(java.io.File file)
|
static void |
removeDirectoryTree(java.io.File file)
|
static void |
saveTextFile(java.io.File file,
java.lang.String text)
|
static void |
saveTextFile(java.io.File file,
java.lang.String text,
boolean checkPermission)
|
static void |
saveTextFile(java.lang.String outputFile,
java.lang.String text)
|
static void |
saveTextFile(java.lang.String outputFile,
java.lang.String text,
boolean checkPermission)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GUIFileSystem
public GUIFileSystem()
getFileExtension
public static java.lang.String getFileExtension(java.io.File file)
- Gets the extension of the input file. If the file name end with '.', the
extension is set to empty string.
copyFile
public static void copyFile(java.io.File inputFile,
java.io.File outputFile)
throws java.io.IOException
- Throws:
java.io.IOException
readTextFile
public static java.lang.String readTextFile(java.io.File file)
throws java.lang.Exception
- Throws:
java.lang.Exception
saveTextFile
public static void saveTextFile(java.io.File file,
java.lang.String text)
throws java.io.EOFException,
java.io.IOException,
java.lang.Exception
- Throws:
java.io.EOFException
java.io.IOException
java.lang.Exception
saveTextFile
public static void saveTextFile(java.lang.String outputFile,
java.lang.String text)
throws java.io.EOFException,
java.io.IOException,
java.lang.Exception
- Throws:
java.io.EOFException
java.io.IOException
java.lang.Exception
saveTextFile
public static void saveTextFile(java.io.File file,
java.lang.String text,
boolean checkPermission)
throws java.lang.SecurityException,
java.io.EOFException,
java.io.IOException,
java.lang.Exception
- Throws:
java.lang.SecurityException
java.io.EOFException
java.io.IOException
java.lang.Exception
saveTextFile
public static void saveTextFile(java.lang.String outputFile,
java.lang.String text,
boolean checkPermission)
throws java.lang.SecurityException,
java.io.EOFException,
java.io.IOException,
java.lang.Exception
- Throws:
java.lang.SecurityException
java.io.EOFException
java.io.IOException
java.lang.Exception
removeDirectoryDescendant
public static void removeDirectoryDescendant(java.io.File file)
throws java.io.FileNotFoundException,
java.io.IOException
- Throws:
java.io.FileNotFoundException
java.io.IOException
removeDirectoryTree
public static void removeDirectoryTree(java.io.File file)
throws java.io.FileNotFoundException,
java.io.IOException
- Throws:
java.io.FileNotFoundException
java.io.IOException
readTextFileLines
public static java.util.Vector readTextFileLines(java.lang.String fileName)
throws java.io.EOFException,
java.io.FileNotFoundException,
java.io.IOException
- Reads the input file fileName producing a Vector of lines
(String). The Vector is created removing all comment lines (i.e. line
beginning with '#' or '//').
- Parameters:
fileName
- the name of the input file
- Returns:
- a Vector containing the lines of the file
- Throws:
java.io.EOFException
java.io.FileNotFoundException
java.io.IOException