|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.util.Tool
public abstract class Tool
Command line tools implement the tool interface so that they can be used in the H2 Console.
Field Summary | |
---|---|
protected java.io.PrintStream |
out
The output stream where this tool writes to. |
Constructor Summary | |
---|---|
Tool()
|
Method Summary | |
---|---|
protected void |
printNoDatabaseFilesFound(java.lang.String dir,
java.lang.String db)
Print to the output stream that no database files have been found. |
static int |
readArgBoolean(java.lang.String[] args,
int i)
Read an argument and check if it is true (1), false (-1), or not (0). |
abstract void |
run(java.lang.String... args)
Run the tool with the given output stream and arguments. |
void |
setOut(java.io.PrintStream out)
Sets the standard output stream. |
protected void |
showUsage()
Print the usage of the tool. |
protected java.sql.SQLException |
throwUnsupportedOption(java.lang.String option)
Throw a SQLException saying this command line option is not supported. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.PrintStream out
Constructor Detail |
---|
public Tool()
Method Detail |
---|
public void setOut(java.io.PrintStream out)
out
- the new standard output streampublic abstract void run(java.lang.String... args) throws java.sql.SQLException
args
- the argument list
java.sql.SQLException
protected java.sql.SQLException throwUnsupportedOption(java.lang.String option) throws java.sql.SQLException
option
- the unsupported option
java.sql.SQLException
protected void printNoDatabaseFilesFound(java.lang.String dir, java.lang.String db)
dir
- the directory or nulldb
- the database name or nullprotected void showUsage()
public static int readArgBoolean(java.lang.String[] args, int i)
args
- the list of argumentsi
- the index - 1
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |