private void emptyStream() throws IOException { while (true) { String line = stream.getLine(); String lastLine = stream.lastLine(); if (line.equals(lastLine)) { System.out.println(line); break; } System.out.println(line); } }
public void notestSend() throws Exception { stream.connect("10.2.24.13"); stream.setTimeout(10000); stream.sendLine(""); /* if (!stream.waitFor("ogin:a")) { System.out.println("timeout"); return; } */ stream.sendLine(""); this.emptyStream(); stream.sendLine(""); this.emptyStream(); stream.sendLine(""); this.emptyStream(); stream.sendLine(""); this.emptyStream(); stream.sendLine(""); this.emptyStream(); }
protected void tearDown() throws Exception { stream.disconnect(); }
protected void setUp() throws Exception { super.setUp(); stream = new DefaultStreamConnection(); conn = new TelnetConnectionLibrary(); stream.setConnectionLibrary(conn); }