|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.pds.search.core.util.Utility
public class Utility
Utility class
Constructor Summary | |
---|---|
Utility()
|
Method Summary | |
---|---|
static InputStream |
execHttpRequest(org.apache.http.client.methods.HttpRequestBase request)
|
static String |
getAbsolutePath(String fileType,
String filePath,
boolean isDir)
Method to convert the file path to absolute, if relative, and check if file exists. |
static String |
getDateTime()
Get the current date time. |
static List<File> |
getFileList(String dir,
List<String> filePrefixList)
Utility method to get a list of files from the input directory, based on the list of file prefixes. |
static boolean |
urlExists(String url)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Utility()
Method Detail |
---|
public static String getDateTime()
public static String getAbsolutePath(String fileType, String filePath, boolean isDir) throws InvalidOptionException
fileType
- File type denoted to allow for usable error msgsfilePath
- Current path given through the command-lineisDir
- Designates if filePath specified is a directory. False means
filePath is a file.
InvalidOptionException
- thrown if directory does not existpublic static boolean urlExists(String url)
public static InputStream execHttpRequest(org.apache.http.client.methods.HttpRequestBase request) throws IOException
IOException
public static List<File> getFileList(String dir, List<String> filePrefixList)
dir
- filePrefixList
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |