|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectau.csiro.netcdf.util.Util
public class Util
Util - utility class with various helpful tools... Copyright 2005, CSIRO Australia All rights reserved.
| Constructor Summary | |
|---|---|
Util()
|
|
| Method Summary | |
|---|---|
static int |
fastFileLineCounter(String filePath)
Counts the number of lines in a file. |
static boolean |
fileExists(String filePath)
Check if a file exists for a given file pathname. |
static File |
getExistingFile(String outputFilenameArg)
Creates a new File instance from a given pathname string, if the given pathname string exists. |
static String |
getFileExtension(String fileName)
Method to get the file extension as a String for the supplied file name. |
static List<String> |
getListOfTargetFiles(String foldername,
String pattern)
Retrieve a list of the absolute path names of the files in a folder that match a pattern. |
static String[] |
splitOnNonBackslashedCharacter(String text,
String regex)
Splits the given string around matches of the given non-backslashed regular expression. |
static List<String> |
tokeniseCommaSeparatedString(String commaSeparatedString)
Splits a comma separated String into a List of tokens. |
static boolean |
validateNumber(String number)
Check if a string contains a valid number |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Util()
| Method Detail |
|---|
public static boolean validateNumber(String number)
number - The numeric string to be checked
public static boolean fileExists(String filePath)
filePath - a pathname string.
public static int fastFileLineCounter(String filePath)
filePath - the name of the file to open.
public static File getExistingFile(String outputFilenameArg)
throws IllegalArgumentException
File instance from a given pathname string, if the given pathname string exists.
outputFilenameArg - a pathname string.
File instance.
IllegalArgumentException - thrown if the file can not be found.public static String getFileExtension(String fileName)
fileName - - file name to get extension from
public static List<String> tokeniseCommaSeparatedString(String commaSeparatedString)
String into a List of tokens.
commaSeparatedString - a comma separated String
String is null or empty.
public static String[] splitOnNonBackslashedCharacter(String text,
String regex)
text - the string to be split.regex - the delimiting regular expression.
public static List<String> getListOfTargetFiles(String foldername,
String pattern)
foldername - The name of the folder to be searched or the single file if no patternpattern - The pattern to be matched against. The wildcard characters '?' and '*' are supported.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||