code: public void print(final Object obj) {
          if (trouble || obj == null) {
              usageFlag = true;
              return;
          }
  
          Class<?> clazz = obj.getClass();
          if (clazz == String.class) {
              write((String)obj);
          }
          else if (clazz == StreamCharBuffer.class) {
              write((StreamCharBuffer)obj);
          }
          else if (clazz == GStringImpl.class) {
              write((Writable)obj);
          }
          else if (obj instanceof Writable) {
              write((Writable)obj);
          }
          else if (obj instanceof CharSequence) {
              try {
                  usageFlag = true;
                  CharSequences.writeCharSequence(getOut(), (CharSequence)obj);
              }
              catch (IOException e) {
                  handleIOException(e);
              }
          }
          else {
              write(String.valueOf(obj));
          }
      }
docs: Print an object. The string produced by the <code>{@link
  java.lang.String#valueOf(Object)}</code> method is translated into bytes
  according to the platform's default character encoding, and these bytes
  are written in exactly the manner of the <code>{@link #write(int)}</code>
  method.
  
  @param obj The <code>Object</code> to be printed
  @see java.lang.Object#toString()