code: public void write(int c) throws IOException {
          synchronized (lock) {
              if (writeBuffer == null){
                  writeBuffer = new char[WRITE_BUFFER_SIZE];
              }
              writeBuffer[0] = (char) c;
              write(writeBuffer, 0, 1);
          }
      }
docs: Writes a single character.  The character to be written is contained in
  the 16 low-order bits of the given integer value; the 16 high-order bits
  are ignored.
  
  <p> Subclasses that intend to support efficient single-character output
  should override this method.
  
  @param  c
  int specifying a character to be written
  
  @throws  IOException
  If an I/O error occurs