diff --git a/jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java b/jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java index acbdfa8b..64f1df8e 100644 --- a/jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java +++ b/jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java @@ -72,9 +72,8 @@ public AnsiOutputStream(OutputStream os) { private static final int BEL = 7; private static final int SECOND_ST_CHAR = '\\'; - // TODO: implement to get perf boost: public void write(byte[] b, int off, int len) - - public void write(int data) throws IOException { + @Override + public synchronized void write(int data) throws IOException { switch (state) { case LOOKING_FOR_FIRST_ESC_CHAR: if (data == FIRST_ESC_CHAR) {