code: public static String enc(String in) {
          if (in == null || in.isEmpty()) {
              return "";
          }
          StringBuilder out = new StringBuilder();
          enc(in, out);
          return out.toString();
      }
docs: Returns an XML-appropriate encoding of the given String.
  
  @param in
  The String to encode.
  @return A new, encoded String.