Оптимизирован вывод ShellPrintStream
This commit is contained in:
@@ -35,17 +35,10 @@ public class ShellPrintStream extends PrintStream {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void print(String s) {
|
public void write(byte[] bytes, int off, int len) {
|
||||||
if (consoleReader != null) {
|
if (consoleReader != null) {
|
||||||
println(s);
|
String s = new String(bytes);
|
||||||
} else {
|
|
||||||
super.print(s);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void println(String s) {
|
|
||||||
if (consoleReader != null) {
|
|
||||||
writer.print(ConsoleReader.RESET_LINE);
|
writer.print(ConsoleReader.RESET_LINE);
|
||||||
if (formatter != null) {
|
if (formatter != null) {
|
||||||
writer.print(formatter.format(s));
|
writer.print(formatter.format(s));
|
||||||
@@ -61,7 +54,7 @@ public class ShellPrintStream extends PrintStream {
|
|||||||
}
|
}
|
||||||
writer.flush();
|
writer.flush();
|
||||||
} else {
|
} else {
|
||||||
super.println(s);
|
super.write(bytes, off, len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user