code: public void addWriterListener(WriterListener writerListener) {
          if (writerListener == null) {
              return;
          }
          synchronized (listeners) {
              if (!listeners.contains(writerListener)) {
                  listeners.add(writerListener);
              }
          }
      }
docs: Adds a writer listener to this writer that will be notified when
  new strings are sent.
  
  @param writerListener a writer listener.