public static void writeHtmlCharacterQuotingSpecialCharacters(PrintableStringWriter stream, char ch) {
    switch (ch) {
      case '>': 
        stream.print("&gt;");
      break;
      case '<': 
        stream.print("&lt;");
      break;
      case '&': 
        stream.print("&amp;");
      break;
      case '"': 
        stream.print("&quot;");
      break;
      default:
        stream.print(ch);
      break;
    }
    return;
  }