@Override
        public void write(int b) {
          char c = (char)b;
          myBuffer.append(c);
          if (c == '\n') {
            doFlush();
          }
        }
@Override
        public void write(int b)