equal
deleted
inserted
replaced
131 * named character encoding is not supported |
131 * named character encoding is not supported |
132 * @see URLEncoder#encode(java.lang.String, java.lang.String) |
132 * @see URLEncoder#encode(java.lang.String, java.lang.String) |
133 * @since 1.4 |
133 * @since 1.4 |
134 */ |
134 */ |
135 public static String decode(String s, String enc) throws UnsupportedEncodingException { |
135 public static String decode(String s, String enc) throws UnsupportedEncodingException { |
136 if (enc.length() == 0) { |
136 if (enc.isEmpty()) { |
137 throw new UnsupportedEncodingException ("URLDecoder: empty string enc parameter"); |
137 throw new UnsupportedEncodingException ("URLDecoder: empty string enc parameter"); |
138 } |
138 } |
139 |
139 |
140 try { |
140 try { |
141 Charset charset = Charset.forName(enc); |
141 Charset charset = Charset.forName(enc); |