What does "\u001B[J" represent?

java

Solution

That is Unicode `1B` (the `ESC` character), followed by the two characters `[` and `J`, an ANSI escape sequence common on many terminals.

That particular one clears the screen. Others can be found here.

Problem

Can anyone explain to me what \u001B[J within a string might represent? I'm converting an input byte stream to an ascii string. Perhaps the stream is in some other encoding. UPDATE: This is how I read the stream ``` inputStreamReader = new InputStreamReader(session.getStdout(), "ASCII"); int length = inputStreamReader.read(buffer); stringBuilder.append(buffer, 0, length); // LOG the result StringEscapeUtils.escapeJava(stringBuilder.toString()); ```

Original source