📄 thomsoncfg.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package open.acs.test;import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileReader;import java.io.IOException;import java.nio.CharBuffer;import java.util.logging.Level;import java.util.logging.Logger;import junit.framework.TestCase;import org.openacs.vendors.Vendor;/** * * @author Administrator */public class thomsoncfg extends TestCase { public thomsoncfg(String testName) { super(testName); } @Override protected void setUp() throws Exception { super.setUp(); } @Override protected void tearDown() throws Exception { super.tearDown(); } // TODO add test methods here. The name must begin with 'test'. For example: // public void testHello() {} public void test1 () { FileInputStream fin = null; try { Vendor v = Vendor.getVendor("00147F", "sss", "BANT-V"); fin = new FileInputStream("c:/tmp/user_780.ini"); byte[] b = new byte[fin.available()]; fin.read(b); fin.close(); String cfg = new String(b); String r [] = v.CheckConfig("user.ini", "badname", "badversion", cfg); Logger.getLogger(thomsoncfg.class.getName()).log(Level.SEVERE, null, r); } catch (FileNotFoundException ex) { Logger.getLogger(thomsoncfg.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException ex) { Logger.getLogger(thomsoncfg.class.getName()).log(Level.SEVERE, null, ex); } finally { try { fin.close(); } catch (IOException ex) { Logger.getLogger(thomsoncfg.class.getName()).log(Level.SEVERE, null, ex); } } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -