/** * Convert a character to a numeric character reference. * Convert a unicode character to a numeric character reference of * the form &#xxxx;. * @param character The character to convert. * @return The converted character. * @deprecated Use {@link #encode(int) encode}. */ public static String convertToString (int character) { return (encode (character)); }
/** * Numeric character reference and character entity reference to unicode codec. * Translate the <code>System.in</code> input into an encoded or decoded * stream and send the results to <code>System.out</code>. * @param args If arg[0] is <code>-encode</code> perform an encoding on * <code>System.in</code>, otherwise perform a decoding. */ public static void main (String[] args) { boolean encode; if (0 < args.length && args[0].equalsIgnoreCase ("-encode")) encode = true; else encode = false; if (encode) encode (System.in, System.out); else decode (System.in, System.out); } }
/** * Numeric character reference and character entity reference to unicode codec. * Translate the <code>System.in</code> input into an encoded or decoded * stream and send the results to <code>System.out</code>. * @param args If arg[0] is <code>-encode</code> perform an encoding on * <code>System.in</code>, otherwise perform a decoding. */ public static void main (String[] args) { boolean encode; if (0 < args.length && args[0].equalsIgnoreCase ("-encode")) encode = true; else encode = false; if (encode) encode (System.in, System.out); else decode (System.in, System.out); } }
s = Translate.encode (ret.toString ()); children = null != tag.getChildren (); ret = new StringBuilder (s.length () + 13 + (children ? 16 : 0));