code: public static String printString(CharSequence text)
      {
          if (text == null)
          {
              return "null.string";
          }
          if (text.length() == 0)
          {
              return "\"\"";
          }
  
          StringBuilder builder = new StringBuilder(text.length() + 2);
          try
          {
              printString(builder, text);
          }
          catch (IOException e)
          {
              // Shouldn't happen
              throw new Error(e);
          }
          return builder.toString();
      }
docs: Builds a String denoting an ASCII-encoded Ion string,
  including surrounding double-quotes.
  If the {@code text} is null, this returns {@code "null.string"}.
  
  @param text the text to print; may be {@code null}.
  
  @throws IllegalArgumentException
  if the text contains invalid UTF-16 surrogates.