@Test public void testEscapeSpaceDefault() { PercentEscaper escaper = new PercentEscaper(PercentEscaper.SAFE_PLUS_RESERVED_CHARS_URLENCODER); String actual = escaper.escape("Hello there"); Assert.assertEquals("Hello%20there", actual); }
@Override public String escape(String s) { int slen = s.length(); for (int index = 0; index < slen; index++) { char c = s.charAt(index); if (c >= safeOctets.length || !safeOctets[c]) { return escapeSlow(s, index); } } return s; }
PercentEscaper extends UnicodeEscaper { @Override public String escape(String s) { int slen = s.length(); for (int index = 0; index < slen; index++) { char c = s.charAt(index); if (c >= safeOctets.length || !safeOctets[c]) { return escapeSlow(s, index); } } return s; } }
PercentEscaper extends UnicodeEscaper { @Override public String escape(String s) { int slen = s.length(); for (int index = 0; index < slen; index++) { char c = s.charAt(index); if (c >= safeOctets.length || !safeOctets[c]) { return escapeSlow(s, index); } } return s; } PercentEscaper(String safeChars); @Deprecated  PercentEscaper(String safeChars, boolean plusForSpace); }
PercentEscaper extends UnicodeEscaper { @Override public String escape(String s) { int slen = s.length(); for (int index = 0; index < slen; index++) { char c = s.charAt(index); if (c >= safeOctets.length || !safeOctets[c]) { return escapeSlow(s, index); } } return s; } PercentEscaper(String safeChars); @Deprecated  PercentEscaper(String safeChars, boolean plusForSpace); @Override String escape(String s); }
PercentEscaper extends UnicodeEscaper { @Override public String escape(String s) { int slen = s.length(); for (int index = 0; index < slen; index++) { char c = s.charAt(index); if (c >= safeOctets.length || !safeOctets[c]) { return escapeSlow(s, index); } } return s; } PercentEscaper(String safeChars); @Deprecated  PercentEscaper(String safeChars, boolean plusForSpace); @Override String escape(String s); static final String SAFECHARS_URLENCODER; static final String SAFEPATHCHARS_URLENCODER; static final String SAFE_PLUS_RESERVED_CHARS_URLENCODER; static final String SAFEUSERINFOCHARS_URLENCODER; static final String SAFEQUERYSTRINGCHARS_URLENCODER; }