То, на что он указывает, присутствует в коде в этих строках:
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
PrintStream stream = new PrintStream(outputStream);
package com.javarush.task.task19.task1912;
/*
Ридер обертка 2
*/
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
public class Solution {
public static TestString testString = new TestString();
public static void main(String[] args) {
PrintStream consoleStream = System.out;
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
PrintStream stream = new PrintStream(outputStream);
System.setOut(stream);
testString.printSomething();
byte[] bytes = outputStream.toByteArray();
char[] chars = new char[bytes.length];
for(int i=0; i<bytes.length; i++) {
chars[i] = (char) bytes[i];
}
for(int i=0; i<chars.length; i++) {
try {
if(chars[i] == 't' && chars[i+1] == 'e') {
chars[i] = '?';
chars[i+1] = '?';
}
}
catch (IndexOutOfBoundsException e) {
}
}
System.setOut(consoleStream);
String s = "";
for(int i=0; i<chars.length; i++) {
s = s + chars[i];
}
System.out.println(s);
}
public static class TestString {
public void printSomething() {
System.out.println("it's a text for testing");
}
}
}