org.glite.wmsui.guij
Class Utils
java.lang.Object
org.glite.wmsui.guij.Utils
- public class Utils
- extends java.lang.Object
Implementation of the Utils class. This class provides constant values and
utility methods.
- Version:
- 1.0
- Author:
- Giuseppe Avellino
Constructor Summary |
Utils()
|
Method Summary |
static int |
getOperatingSystem()
|
static int |
getValueType(java.lang.String value)
|
static java.util.Vector |
readTextFileLines(java.lang.String fileName)
Reads the input file fileName producing a Vector of lines
(String). |
static java.lang.String |
secondsToTime(int seconds)
|
static java.lang.String |
solveEnviron(java.lang.String path)
Returns the input path after resolving all the environment
variables. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Utils
public Utils()
getOperatingSystem
public static int getOperatingSystem()
getValueType
public static int getValueType(java.lang.String value)
secondsToTime
public static java.lang.String secondsToTime(int seconds)
solveEnviron
public static java.lang.String solveEnviron(java.lang.String path)
throws org.glite.jdl.JobAdException
- Returns the input path after resolving all the environment
variables.
- Parameters:
path
- the input path to resolve
- Returns:
- the resolved path
- Throws:
org.glite.jdl.JobAdException
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