code: public void print(String s) throws IOException
    {
      if (_startLine)
        printIndent();
  
      if (s == null) {
        _lastCr = false;
        _os.print("null");
  
        return;
      }
  
      int len = s.length();
      for (int i = 0; i < len; i++) {
        int ch = s.charAt(i);
  
        if (ch == '\n' && !_lastCr)
          _destLine++;
        else if (ch == '\r')
          _destLine++;
  
        _lastCr = ch == '\r';
  
        _os.print((char) ch);
      }
    }
docs: Prints a string