public class Utility extends Object
Constructor and Description |
---|
Utility() |
Modifier and Type | Method and Description |
---|---|
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) |
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
Copyright © 2010–2018 Planetary Data System. All rights reserved.