Package gov.nasa.pds.search.util
Class RegistryInstallerUtils
- java.lang.Object
-
- gov.nasa.pds.search.util.RegistryInstallerUtils
-
public class RegistryInstallerUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description RegistryInstallerUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidbailOutMissingOption(String option)static voidbailOutWithMessage(String msg)static voidcopy(Path from, Path to)static voidcopyAll(String fromDir, String toDir)static voidcopyAllType(String fromDir, String toDir, String ext)static voidcopyDir(String fromDir, String toDir)static voidcreateFile(Path filePath)static booleandeleteDirectory(File path)static voidflushConsole()static StringgetFileContents(Path filePath)static InstallerPresetsgetInstallerPresets()static StringgetPreset(String key)static booleanisLocalPortAvailable(int port)Returns true if the specified (local) port is available for use by SEARCH.static booleanisPresetValue(String key)static booleanisRemotePortListening(String hostname, int port)Returns true if the specified (remote) port is available for use by SEARCH.static voidmkDir(String dir)static voidmkDirs(String dir)static voidopenUpPermissions(String filePath)static voidprint(String msg)static StringreadLine(String fmt, String defaultValue)static char[]readPassword(String fmt)static StringreadRequiredLine(String fmt, String requireValueMsg)static voidsafeClose(Closeable obj)static voidsafeClose(Process proc)static booleanserverListening(String host, int port)Checks to see if a server is listening on the specified port.static voidwriteToFile(Path filePath, String content)
-
-
-
Method Detail
-
mkDir
public static void mkDir(String dir)
-
mkDirs
public static void mkDirs(String dir)
-
bailOutMissingOption
public static void bailOutMissingOption(String option)
-
bailOutWithMessage
public static void bailOutWithMessage(String msg)
-
deleteDirectory
public static boolean deleteDirectory(File path)
-
readPassword
public static char[] readPassword(String fmt)
-
flushConsole
public static void flushConsole()
-
isPresetValue
public static boolean isPresetValue(String key)
-
isLocalPortAvailable
public static boolean isLocalPortAvailable(int port)
Returns true if the specified (local) port is available for use by SEARCH.
-
isRemotePortListening
public static boolean isRemotePortListening(String hostname, int port)
Returns true if the specified (remote) port is available for use by SEARCH.
-
serverListening
public static boolean serverListening(String host, int port)
Checks to see if a server is listening on the specified port.
-
copyDir
public static void copyDir(String fromDir, String toDir) throws IOException
- Throws:
IOException
-
print
public static void print(String msg)
-
openUpPermissions
public static void openUpPermissions(String filePath) throws IOException
- Throws:
IOException
-
getFileContents
public static String getFileContents(Path filePath) throws IOException
- Throws:
IOException
-
writeToFile
public static void writeToFile(Path filePath, String content) throws IOException
- Throws:
IOException
-
createFile
public static void createFile(Path filePath) throws IOException
- Throws:
IOException
-
getInstallerPresets
public static InstallerPresets getInstallerPresets()
-
safeClose
public static void safeClose(Process proc)
-
safeClose
public static void safeClose(Closeable obj)
-
-