クラス org.objectweb.cjdbc.console.text.commands.controller.AddDriver

org.objectweb.cjdbc.console.text.commands.controller.AddDriverに対する継承グラフ

Inheritance graph
[凡例]
org.objectweb.cjdbc.console.text.commands.controller.AddDriverのコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

説明

This class defines a AddDriver

作者:
Nicolas Modrzyk
バージョン:
1.0

AddDriver.java43 行で定義されています。

Public メソッド

 AddDriver (AbstractConsoleModule module)
void parse (String commandText) throws IOException, ConsoleException
String getCommandName ()
String getCommandDescription ()
String getCommandParameters ()

Private メソッド

byte[] readDriver (String filename) throws FileNotFoundException, IOException


コンストラクタとデストラクタ

org.objectweb.cjdbc.console.text.commands.controller.AddDriver.AddDriver AbstractConsoleModule  module  ) 
 

Creates a new AddDriver.java object

引数:
module the command is attached to
AddDriver.java51 行で定義されています。
00052 { 00053 super(module); 00054 }


メソッド

String org.objectweb.cjdbc.console.text.commands.controller.AddDriver.getCommandDescription  )  [virtual]
 

参照:
org.objectweb.cjdbc.console.text.commands.ConsoleCommand.getCommandDescription()

org.objectweb.cjdbc.console.text.commands.ConsoleCommandを実装しています.

AddDriver.java133 行で定義されています。

00134 { 00135 return ConsoleTranslate.get("controller.command.adddriver"); 00136 }

String org.objectweb.cjdbc.console.text.commands.controller.AddDriver.getCommandName  )  [virtual]
 

参照:
org.objectweb.cjdbc.console.text.commands.ConsoleCommand.getCommandName()

org.objectweb.cjdbc.console.text.commands.ConsoleCommandを実装しています.

AddDriver.java125 行で定義されています。

00126 { 00127 return "addDriver"; 00128 }

String org.objectweb.cjdbc.console.text.commands.controller.AddDriver.getCommandParameters  ) 
 

参照:
org.objectweb.cjdbc.console.text.commands.ConsoleCommand.getCommandParameters()

org.objectweb.cjdbc.console.text.commands.ConsoleCommandを再定義しています。

AddDriver.java141 行で定義されています。

00142 { 00143 return "<driverPathName>"; 00144 }

void org.objectweb.cjdbc.console.text.commands.controller.AddDriver.parse String  commandText  )  throws IOException, ConsoleException [virtual]
 

参照:
org.objectweb.cjdbc.console.text.commands.ConsoleCommand.parse(java.lang.String)

org.objectweb.cjdbc.console.text.commands.ConsoleCommandを実装しています.

AddDriver.java59 行で定義されています。

参照先 org.objectweb.cjdbc.console.jmx.RmiJmxClient.getControllerProxy(), org.objectweb.cjdbc.console.text.Console.println(), org.objectweb.cjdbc.console.text.commands.controller.AddDriver.readDriver(), と org.objectweb.cjdbc.console.text.Console.readLine().

00060 { 00061 String filename = null; 00062 // Get the file name if needed 00063 if (commandText == null || commandText.trim().equals("")) 00064 { 00065 try 00066 { 00067 filename = console.readLine(ConsoleTranslate 00068 .get("controller.command.adddriver.input.filename")); 00069 } 00070 catch (Exception che) 00071 { 00072 } 00073 } 00074 else 00075 filename = commandText.trim(); 00076 00077 if (filename == null || filename.equals("")) 00078 throw new ConsoleException(ConsoleTranslate 00079 .get("controller.command.adddriver.null.filename")); 00080 00081 try 00082 { 00083 // Send the file contents to the controller 00084 jmxClient.getControllerProxy().addDriver(readDriver(filename)); 00085 console.println(ConsoleTranslate.get( 00086 "controller.command.adddriver.file.sent", filename)); 00087 } 00088 catch (FileNotFoundException fnf) 00089 { 00090 throw new ConsoleException(ConsoleTranslate.get( 00091 "controller.command.adddriver.file.not.found", filename)); 00092 } 00093 catch (Exception ioe) 00094 { 00095 throw new ConsoleException(ConsoleTranslate.get( 00096 "controller.command.adddriver.sent.failed", ioe)); 00097 } 00098 }

byte [] org.objectweb.cjdbc.console.text.commands.controller.AddDriver.readDriver String  filename  )  throws FileNotFoundException, IOException [private]
 

AddDriver.java100 行で定義されています。

参照元 org.objectweb.cjdbc.console.text.commands.controller.AddDriver.parse().

00102 { 00103 File file; 00104 FileInputStream fileInput = null; 00105 file = new File(filename); 00106 fileInput = new FileInputStream(file); 00107 00108 // Read the file into an array of bytes 00109 long size = file.length(); 00110 if (size > Integer.MAX_VALUE) 00111 throw new IOException(ConsoleTranslate 00112 .get("controller.command.adddriver.file.too.big")); 00113 byte[] bytes = new byte[(int) size]; 00114 int nb = fileInput.read(bytes); 00115 fileInput.close(); 00116 if (nb != size) 00117 throw new IOException(ConsoleTranslate 00118 .get("controller.command.adddriver.file.not.read")); 00119 return bytes; 00120 }


このクラスの説明は次のファイルから生成されました:
CJDBCversion1.0.4に対してTue Oct 12 15:16:26 2004に生成されました。 doxygen 1.3.8