@Test public void testURLEscapeModifier() throws IOException { TemplateEncoder encoder = new TemplateEncoder(getClass().getResource("url.txt")); String result; try (StringWriter writer = new StringWriter()) { encoder.write("abc:def&xyz", writer); result = writer.toString(); } assertEquals("abc%3Adef%26xyz", result); }
@Override public void write(Object value, OutputStream outputStream) throws IOException { write(value, outputStream, Locale.getDefault()); }
TemplateEncoder extends Encoder<Object> { @Override public void write(Object value, OutputStream outputStream) throws IOException { write(value, outputStream, Locale.getDefault()); } }
TemplateEncoder extends Encoder<Object> { @Override public void write(Object value, OutputStream outputStream) throws IOException { write(value, outputStream, Locale.getDefault()); } TemplateEncoder(URL url);  TemplateEncoder(URL url, Charset charset); }
TemplateEncoder extends Encoder<Object> { @Override public void write(Object value, OutputStream outputStream) throws IOException { write(value, outputStream, Locale.getDefault()); } TemplateEncoder(URL url);  TemplateEncoder(URL url, Charset charset); Map<String, Modifier> getModifiers(); String getBaseName(); void setBaseName(String baseName); Map<String, ?> getContext(); void setContext(Map<String, ?> context); @Override void write(Object value, OutputStream outputStream); void write(Object value, OutputStream outputStream, Locale locale); void write(Object value, OutputStream outputStream, Locale locale, TimeZone timeZone); @Override void write(Object value, Writer writer); void write(Object value, Writer writer, Locale locale); void write(Object value, Writer writer, Locale locale, TimeZone timeZone); static Map<String, Modifier> getDefaultModifiers(); }
TemplateEncoder extends Encoder<Object> { @Override public void write(Object value, OutputStream outputStream) throws IOException { write(value, outputStream, Locale.getDefault()); } TemplateEncoder(URL url);  TemplateEncoder(URL url, Charset charset); Map<String, Modifier> getModifiers(); String getBaseName(); void setBaseName(String baseName); Map<String, ?> getContext(); void setContext(Map<String, ?> context); @Override void write(Object value, OutputStream outputStream); void write(Object value, OutputStream outputStream, Locale locale); void write(Object value, OutputStream outputStream, Locale locale, TimeZone timeZone); @Override void write(Object value, Writer writer); void write(Object value, Writer writer, Locale locale); void write(Object value, Writer writer, Locale locale, TimeZone timeZone); static Map<String, Modifier> getDefaultModifiers();  }