code: private static void enc(String in, StringBuilder out) {
          for (int i = 0; i < in.length(); i++) {
              enc(in.charAt(i), out);
          }
      }
docs: Appends an XML-appropriate encoding of the given String to the given
  StringBuffer.
  
  @param in
  The String to encode.
  @param buf
  The StringBuffer to write to.