public abstract class Tool extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected PrintStream |
out
The output stream where this tool writes to.
|
| 构造器和说明 |
|---|
Tool() |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
isOption(String arg,
String option)
Check if the argument matches the option.
|
protected void |
printNoDatabaseFilesFound(String dir,
String db)
Print to the output stream that no database files have been found.
|
abstract void |
runTool(String... args)
Run the tool with the given output stream and arguments.
|
void |
setOut(PrintStream out)
Sets the standard output stream.
|
protected void |
showUsage()
Print the usage of the tool.
|
protected SQLException |
showUsageAndThrowUnsupportedOption(String option)
Throw a SQLException saying this command line option is not supported.
|
protected SQLException |
throwUnsupportedOption(String option)
Throw a SQLException saying this command line option is not supported.
|
protected PrintStream out
public void setOut(PrintStream out)
out - the new standard output streampublic abstract void runTool(String... args) throws SQLException
args - the argument listSQLException - on failureprotected SQLException showUsageAndThrowUnsupportedOption(String option) throws SQLException
option - the unsupported optionSQLException - on failureprotected SQLException throwUnsupportedOption(String option) throws SQLException
option - the unsupported optionSQLException - on failureprotected void printNoDatabaseFilesFound(String dir, String db)
dir - the directory or nulldb - the database name or nullprotected void showUsage()
Copyright © 2022. All rights reserved.