code: public void write(int c) throws IOException {
          synchronized (lock) {
              ensureOpen();
              if (nextChar >= nChars)
                  flushBuffer();
              cb[nextChar++] = (char) c;
          }
      }
docs: Writes a single character.
  
  @exception  IOException  If an I/O error occurs