提交 ee27b252 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 988978ad
......@@ -326,7 +326,12 @@ public class Shell extends Tool {
println("Connected");
}
private void print(String s) {
/**
* Print the string without newline, and flush.
*
* @param s the string to print
*/
protected void print(String s) {
out.print(s);
out.flush();
}
......@@ -347,6 +352,7 @@ public class Shell extends Tool {
} catch (Exception e) {
// ignore, use the default solution
}
/**
* This thread hides the password by repeatedly printing
* backspace, backspace, >, <.
......@@ -355,7 +361,7 @@ public class Shell extends Tool {
volatile boolean stop;
public void run() {
while (!stop) {
out.print("\b\b><");
print("\b\b><");
try {
Thread.sleep(10);
} catch (InterruptedException e) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论