@Test public void caseSensitive() { String unescaped = "Ü ü & &"; assertEquals("&Uuml; &uuml; &amp; &amp;", Entities.escape(unescaped, new OutputSettings().charset("ascii").escapeMode(extended))); String escaped = "&Uuml; &uuml; &amp; &AMP"; assertEquals("Ü ü & &", Entities.unescape(escaped)); }
static String escape(String string, Document.OutputSettings out) { StringBuilder accum = new StringBuilder(string.length() * 2); try { escape(accum, string, out, false, false, false); } catch (IOException e) { throw new SerializationException(e); } return accum.toString(); }
Entities { static String escape(String string, Document.OutputSettings out) { StringBuilder accum = new StringBuilder(string.length() * 2); try { escape(accum, string, out, false, false, false); } catch (IOException e) { throw new SerializationException(e); } return accum.toString(); } }
Entities { static String escape(String string, Document.OutputSettings out) { StringBuilder accum = new StringBuilder(string.length() * 2); try { escape(accum, string, out, false, false, false); } catch (IOException e) { throw new SerializationException(e); } return accum.toString(); } private  Entities(); }
Entities { static String escape(String string, Document.OutputSettings out) { StringBuilder accum = new StringBuilder(string.length() * 2); try { escape(accum, string, out, false, false, false); } catch (IOException e) { throw new SerializationException(e); } return accum.toString(); } private  Entities(); static boolean isNamedEntity(final String name); static boolean isBaseNamedEntity(final String name); static Character getCharacterByName(String name); static String getByName(String name); static int codepointsForName(final String name, final int[] codepoints); }
Entities { static String escape(String string, Document.OutputSettings out) { StringBuilder accum = new StringBuilder(string.length() * 2); try { escape(accum, string, out, false, false, false); } catch (IOException e) { throw new SerializationException(e); } return accum.toString(); } private  Entities(); static boolean isNamedEntity(final String name); static boolean isBaseNamedEntity(final String name); static Character getCharacterByName(String name); static String getByName(String name); static int codepointsForName(final String name, final int[] codepoints);  }