私の場合、私は書いた
private static final String SYMBOL_EQUAL = "=";
private static final String SYMBOL_COMMA = ",";
private static final String SYMBOL_AND = "&";
public static HashMap<String, String> getParamList(String encodedUrl) throws IOException {
final HashMap<String, String> map = new HashMap<String, String>();
final String url = URLDecoder.decode(encodedUrl, StandardCharsets.UTF_8.name());
final String[] params = url.split(SYMBOL_AND);
try {
for (final String param : params) {
final String name = param.split(SYMBOL_EQUAL)[0];
final String value = param.split(SYMBOL_EQUAL)[1];
map.put(name, value);
}
} catch (final Exception e) {
LOGGER.error(e.getMessage());
}
return map;
}