@Test public void testPercentEncode() { System.out.println("percentEncode"); String value = ""; String expResult = ""; String result = Parameter.percentEncode(value); assertEquals(expResult, result); }
public static String percentEncode(String value) { if (value == null) return ""; try { return URLEncoder.encode(value, "UTF-8").replace("%7E", "~"); } catch (UnsupportedEncodingException e) { return null; } }
Parameter implements Comparable<Parameter>, Map.Entry<String, String> { public static String percentEncode(String value) { if (value == null) return ""; try { return URLEncoder.encode(value, "UTF-8").replace("%7E", "~"); } catch (UnsupportedEncodingException e) { return null; } } }
Parameter implements Comparable<Parameter>, Map.Entry<String, String> { public static String percentEncode(String value) { if (value == null) return ""; try { return URLEncoder.encode(value, "UTF-8").replace("%7E", "~"); } catch (UnsupportedEncodingException e) { return null; } } Parameter(String key, String value); }
Parameter implements Comparable<Parameter>, Map.Entry<String, String> { public static String percentEncode(String value) { if (value == null) return ""; try { return URLEncoder.encode(value, "UTF-8").replace("%7E", "~"); } catch (UnsupportedEncodingException e) { return null; } } Parameter(String key, String value); @Override String getKey(); @Override String getValue(); @Override String setValue(String value); @Override String toString(); @Override int compareTo(Parameter other); static String percentEncode(String value); }
Parameter implements Comparable<Parameter>, Map.Entry<String, String> { public static String percentEncode(String value) { if (value == null) return ""; try { return URLEncoder.encode(value, "UTF-8").replace("%7E", "~"); } catch (UnsupportedEncodingException e) { return null; } } Parameter(String key, String value); @Override String getKey(); @Override String getValue(); @Override String setValue(String value); @Override String toString(); @Override int compareTo(Parameter other); static String percentEncode(String value);  }