Tool
Command line tools implement the tool interface so that they can be used in
the H2 Console.
| Methods |
| static boolean |
isOption(String arg, String option)
Check if the argument matches the option.
|
| static boolean |
isOption(String arg, String option)
Check if the argument matches the option.
If the argument starts with this option, but doesn't match,
then an exception is thrown.
Parameters:
arg - the argument
option - the command line option
Returns:
true if it matches
|
| void |
printNoDatabaseFilesFound(String dir, String db)
Print to the output stream that no database files have been found.
|
| void |
printNoDatabaseFilesFound(String dir, String db)
Print to the output stream that no database files have been found.
Parameters:
dir - the directory or null
db - the database name or null
|
| void |
runTool(String... args)
Run the tool with the given output stream and arguments.
|
| void |
runTool(String... args) throws SQLException
Run the tool with the given output stream and arguments.
Parameters:
args - the argument list
|
| void |
setOut(PrintStream out)
Sets the standard output stream.
|
| void |
setOut(PrintStream out)
Sets the standard output stream.
Parameters:
out - the new standard output stream
|
| void |
showUsage()
Print the usage of the tool.
|
| void |
showUsage()
Print the usage of the tool. This method reads the description from the
resource file.
|
| SQLException |
showUsageAndThrowUnsupportedOption(String option)
Throw a SQLException saying this command line option is not supported.
|
| SQLException |
showUsageAndThrowUnsupportedOption(String option) throws SQLException
Throw a SQLException saying this command line option is not supported.
Parameters:
option - the unsupported option
Returns:
this method never returns normally
|
| SQLException |
throwUnsupportedOption(String option)
Throw a SQLException saying this command line option is not supported.
|
| SQLException |
throwUnsupportedOption(String option) throws SQLException
Throw a SQLException saying this command line option is not supported.
Parameters:
option - the unsupported option
Returns:
this method never returns normally
|
| Fields |
| static PrintStream |
out
|
out
The output stream where this tool writes to.
|