public class Utility
extends java.lang.Object
Constructor and Description |
---|
Utility() |
Modifier and Type | Method and Description |
---|---|
static java.io.InputStream |
execHttpRequest(org.apache.http.client.methods.HttpRequestBase request) |
static java.lang.String |
getAbsolutePath(java.lang.String fileType,
java.lang.String filePath,
boolean isDir)
Method to convert the file path to absolute, if relative, and check if
file exists.
|
static java.lang.String |
getDateTime()
Get the current date time.
|
static java.util.List<java.io.File> |
getFileList(java.lang.String dir,
java.util.List<java.lang.String> filePrefixList)
Utility method to get a list of files from the input directory, based on the
list of file prefixes.
|
static boolean |
urlExists(java.lang.String url) |
public static java.lang.String getDateTime()
public static java.lang.String getAbsolutePath(java.lang.String fileType, java.lang.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(java.lang.String url)
public static java.io.InputStream execHttpRequest(org.apache.http.client.methods.HttpRequestBase request) throws java.io.IOException
java.io.IOException
public static java.util.List<java.io.File> getFileList(java.lang.String dir, java.util.List<java.lang.String> filePrefixList)
dir
- filePrefixList
- Copyright © 2010-2018 Planetary Data System. All Rights Reserved.