List of utility methods to do URL Decode
String | decodeInternally(String encoded) decode Internally try { return URLDecoder.decode(encoded, "UTF8"); } catch (UnsupportedEncodingException e) { throw new UncheckedIOException(e); |
String | decodeJobHistoryFileName(String logFileName) Helper function to decode the URL of the filename of the job-history log file. String decodedFileName = null; try { decodedFileName = URLDecoder.decode(logFileName, "UTF-8"); } catch (UnsupportedEncodingException uee) { IOException ioe = new IOException(); ioe.initCause(uee); ioe.setStackTrace(uee.getStackTrace()); throw ioe; ... |
Map | decodeKVMap(String keyValueString) Unwrap a URI-encoded key value map into its constituents. Map<String, String> keyValueMap = new HashMap<String, String>(); if (keyValueString != null && !keyValueString.isEmpty()) { if (keyValueString.startsWith("?")) { keyValueString = keyValueString.substring(1); String[] keyValuePairs = keyValueString.split("&"); for (String keyValuePair : keyValuePairs) { try { ... |
String | decodeName(final String name) decode Name try { return URLDecoder.decode(name, "UTF-8"); } catch (UnsupportedEncodingException e) { throw new IllegalStateException( "Unsupported UTF-8 charset. Scenarioo needs to run on a JVM or server environment that supports 'UTF-8'.", e); |
String | decodeName(String createdName) decode Name try { return URLDecoder.decode(createdName, "UTF-8"); } catch (final UnsupportedEncodingException e) { e.printStackTrace(); return createdName; |
String | DecodePath(String path) Decode Path if (path.startsWith("/")) { path = path.substring(1); String[] pathElements = path.split("/"); StringBuffer sb = new StringBuffer(); for (String string : pathElements) { sb.append("/").append(URLDecoder.decode(string, "UTF-8")); return sb.toString(); |
String | decodePercent(String s) decode Percent try { return URLDecoder.decode(s, ENCODING); } catch (java.io.UnsupportedEncodingException wow) { throw new RuntimeException(wow.getMessage(), wow); |
String | decodePercent(String str) Decode percent encoded String values.
String decoded = null; try { decoded = URLDecoder.decode(str, "UTF8"); } catch (UnsupportedEncodingException ignored) { return decoded; |
String | decodeRequestBody(String requestBody) Decode given request body as UTF-8 string. return URLDecoder.decode(requestBody, "UTF-8"); |
String | decodeRequestString2(String inputString) decode Request String if (inputString.startsWith("REQUEST=")) { inputString = inputString.substring(8); } else if (inputString.startsWith("---")) { int iIndexStart = inputString.indexOf("<?xml"); inputString = inputString.substring(iIndexStart); int iIndexEnd = inputString.indexOf("---"); inputString = inputString.substring(0, iIndexEnd); return java.net.URLDecoder.decode(inputString, "ISO-8859-1"); |