package class8_1_StreamDecorator_HalfExam2Solution; import java.io.FilterWriter; import java.io.IOException; import java.io.Writer; public class EncryptorWriter extends FilterWriter { @Override public void write(int c) throws IOException { int encrypted = (c + key)%255; super.write(encrypted); // The bug: I had c on this line instead of encrypted. //out.write(encrypted); // can also use protected variale } private int key; public EncryptorWriter(int key, Writer out) { super(out); this.key = key; } @Override public void write(String str, int off, int len) throws IOException { for(int i = off; i